Skip to content

fix(flask): define quantities before length check in checkout#1343

Draft
sentry[bot] wants to merge 1 commit intomasterfrom
seer/fix/flask-checkout-quantities-def
Draft

fix(flask): define quantities before length check in checkout#1343
sentry[bot] wants to merge 1 commit intomasterfrom
seer/fix/flask-checkout-quantities-def

Conversation

@sentry
Copy link
Contributor

@sentry sentry bot commented Mar 12, 2026

Fixes FRONTEND-REACT-6AX. The issue was that: Flask's checkout function references quantities before assignment, causing UnboundLocalError and subsequent 500 response.

  • Moved the initialization of the 'quantities' dictionary to occur before its length is checked.
  • Prevents a potential NameError if 'quantities' was accessed before being defined when the cart is empty.

This fix was generated by Seer in Sentry, triggered by prithvirajkumar.rajakumar@sentry.io. 👁️ Run ID: 11422088

Not quite right? Click here to continue debugging with Seer.

@vercel
Copy link
Contributor

vercel bot commented Mar 12, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
empower Ignored Ignored Preview Mar 12, 2026 6:20pm

Request Review

@sentry sentry bot requested a review from Prithvirajkumar March 12, 2026 18:20
@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 22.02%. Comparing base (ea8fa12) to head (fbcbc26).
⚠️ Report is 5 commits behind head on master.
✅ 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.02%) 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    #1343      +/-   ##
==========================================
+ Coverage   22.01%   22.02%   +0.01%     
==========================================
  Files          42       42              
  Lines        1363     1362       -1     
  Branches      175      176       +1     
==========================================
  Hits          300      300              
  Misses       1036     1036              
+ Partials       27       26       -1     
Flag Coverage Δ
api 5.83% <0.00%> (ø)
frontend 32.37% <ø> (+0.03%) ⬆️
Components Coverage Δ
checkout_module 5.83% <0.00%> (ø)
product_component 26.03% <ø> (+0.04%) ⬆️
Files with missing lines Coverage Δ
flask/src/main.py 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

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.

0 participants