Opened 3 hours ago
Last modified 3 hours ago
#36100 assigned Cleanup/optimization
get_next_by_FIELD() check for unsaved objects should account for composite primary keys
Reported by: | Jacob Walls | Owned by: | Jacob Walls |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
PR to keep the check for unsaved objects at the top of get_next_by_FIELD()
compatible with unsaved objects having composite primary keys.
More of a cleanup (?), since ValueError was still being raised at the ORM level:
AssertionError: 'get_next/get_previous cannot be used on unsaved objects.' not found in 'Cannot use None as a query value'
Change History (2)
comment:1 by , 3 hours ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 3 hours ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Thank you!