human-essentials
human-essentials copied to clipboard
[BUG]: cannot update donations when inventory is below distribution
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
Related to #4172
After creating a distribution which decreases the inventory for an item, attempts to update donations which have that item fail with "Error updating donation: Requested items exceed the available inventory", even if the quantity for that item remains the same or increases.
Expected Behavior
It should let you update the donation if the quantity for that item remains the same or increases.
Steps To Reproduce
-
bin/setup
followed bybin/start
- In browser, create a distribution at a storage location which decreases the inventory for an item
- In browser, attempt to update a donation which contains that item at that storage location
Environment
main commit 524eaa
Criteria for Completion
[] fix [] write tests
Anything else?
No response
Code of Conduct
- [X] I've read the Code of Conduct and understand my responsibilities as a member of the Ruby for Good community