#36722: MySQL backend raises error when selecting 0 using an expression 
targeting
an autofield.
-------------------------------------+-------------------------------------
     Reporter:  Clifford Gama        |                    Owner:  Clifford
                                     |  Gama
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  allows_auto_pk_0     |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

 * resolution:   => fixed
 * status:  assigned => closed

Comment:

 In [changeset:"55888655a269f41025405b9a1bff14117ae58e2a" 5588865]:
 {{{#!CommitTicketReference repository=""
 revision="55888655a269f41025405b9a1bff14117ae58e2a"
 Fixed #36722 -- Moved AutoFieldMixin validate_autopk_value() check to
 get_db_prep_save.

 The validation in validate_autopk_value is specific to saving. Having it
 in
 get_db_prep_value caused Value(0, AutoField()) to fail unexpectedly when
 used
 in a filter on MySQL.

 Thanks Jacob Walls for the review.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36722#comment:6>
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/0107019aeef0548a-b35c1ca2-e0b1-4d47-ba62-4842bef1065b-000000%40eu-central-1.amazonses.com.

Reply via email to