What should we do with InventoryItem /w no matching StorageLocation #2078
Replies: 1 comment
-
I thought we had some logic in there to check if the warehouse ever had items associated with it and if so we just soft delete it. Otherwise wouldn't the error cascade down into all parts of the app (donations, purchases, etc) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I noticed that from investigating this bug - https://app.bugsnag.com/ruby-for-good/diaperbase/errors/5fe36be8db43090017efc793?event_id=5fe36be8006591237b470000&i=sk&m=nw
That we have InventoryItems that have StorageLocation records that match an existing record. This I believe is caused by not destroying associated InventoryItem when destroying in a StorageLocation.
I believe we should add a dependent: destroy of InventoryItem when StorageLocation gets deleted.
Things to Consider
I'am not 100% sure this is okay. Would love to get feedback from others
Beta Was this translation helpful? Give feedback.
All reactions