#36100: get_next_by_FIELD() check for unsaved objects should account for composite
primary keys
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Jacob Walls
Walls |
Type: | Status: assigned
Cleanup/optimization |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
[
https://github.com/django/django/pull/19050 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'
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/36100>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.