Skip to content

Fix UnboundLocalError in checkout endpoint#1323

Draft
idosun wants to merge 1 commit intomasterfrom
cursor/flask-checkout-quantities-definition-66d4
Draft

Fix UnboundLocalError in checkout endpoint#1323
idosun wants to merge 1 commit intomasterfrom
cursor/flask-checkout-quantities-definition-66d4

Conversation

@idosun
Copy link
Contributor

@idosun idosun commented Mar 4, 2026

Define 'quantities' variable before checking its length to prevent UnboundLocalError when validating cart data. This was causing HTTP 500 errors when the Android app attempted to checkout.

Fixes ANDROID-CJ

Define 'quantities' variable before checking its length to prevent
UnboundLocalError when validating cart data. This was causing HTTP 500
errors when the Android app attempted to checkout.

Fixes ANDROID-CJ
@vercel
Copy link
Contributor

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
empower Ignored Ignored Mar 4, 2026 7:10pm

Request Review

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 22.01%. Comparing base (743e6e1) to head (0466a38).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
flask/src/main.py 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (22.01%) is below the target coverage (35.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1323   +/-   ##
=======================================
  Coverage   22.01%   22.01%           
=======================================
  Files          42       42           
  Lines        1363     1363           
  Branches      176      176           
=======================================
  Hits          300      300           
- Misses       1036     1037    +1     
+ Partials       27       26    -1     
Flag Coverage Δ
api 5.83% <0.00%> (ø)
frontend 32.33% <ø> (ø)
Components Coverage Δ
checkout_module 5.83% <0.00%> (ø)
product_component 25.98% <ø> (ø)
Files with missing lines Coverage Δ
flask/src/main.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@idosun
Copy link
Contributor Author

idosun commented Mar 24, 2026

@sentry review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants