Skip to content
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

Support None as quantity #4170

Closed
wants to merge 1 commit into from
Closed

Support None as quantity #4170

wants to merge 1 commit into from

Conversation

bitbyt3r
Copy link
Member

The badge_cost receiptItem is returning return (label, cost, None)

This breaks the default_badge_cost logic as it tries multiplying the cost with None:

if len(cost_calc) > 2:
    return cost_calc[1] * cost_calc[2] / 100

I think in the case that the quantity is None we can just assume the price is multiplied by 1?

@bitbyt3r bitbyt3r requested a review from kitsuta July 10, 2023 07:01
@kitsuta
Copy link
Member

kitsuta commented Jul 10, 2023

I have to implement a slightly more complicated fix due to the way I broke it, but knowing the exact issue helped a lot!

@kitsuta kitsuta closed this Jul 10, 2023
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