Opened 10 months ago
Closed 10 months ago
#36100 closed Cleanup/optimization (fixed)
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 (3)
comment:1 by , 10 months ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 10 months ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Thank you!