#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701946a077505-79032312-ce03-42c2-af45-2c3819b41ebe-000000%40eu-central-1.amazonses.com.

Reply via email to