Skip to content

Refactor order processing to use product mapping and quantities #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

seer-by-sentry[bot]
Copy link

Fixes ANDROID-4Q. The issue was that: Flask backend's process_order function attempts Inventory[numeric_id], but Inventory uses string keys, causing KeyError and 500 response.

  • Added a product mapping to translate product IDs to names.
  • Modified process_order to use the product mapping and quantities from the cart.
  • Updated inventory management to use product names instead of IDs.
  • Improved logging to include the quantity purchased and remaining stock.

This fix was generated by Seer in Sentry, triggered by [email protected]. 👁️ Run ID: 194986

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

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