-
Notifications
You must be signed in to change notification settings - Fork 0
feat(backend): Define and Document Item History & Location Logic #21
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
base: main
Are you sure you want to change the base?
Conversation
vivjd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Just one minor change and it should be good to go
backend/inventory/utils.py
Outdated
| - No location-changing events: Returns None. This is expected for items that have | ||
| only workflow events (MOVE_REQUESTED, MOVE_APPROVED, etc.) but no actual location | ||
| changes yet. However, every item should ideally have at least an INITIAL event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No location-changing events: Returns None.
This sounds like that if there are no location events regardless of there's an initial event, the function will return None (whereas in reality it will return the initial event if it's present). So maybe change it to something like "no location-changing events and initial event is not present".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Vivian, just implemented some changes. Please let me know if I should revise further.
vivjd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you for the changes
Summary
Formalizes how
ItemHistorydetermines an item’s current location.Related Issues
Changes
get_current_locationto identify events that update true location (INITIAL,ARRIVED,VERIFIED,CORRECTION)get_current_locationHow to Test
Checklist