#22728: get_or_create with field lookups cause empty values
-------------------------------------+-------------------------------------
     Reporter:  Xudonax              |                    Owner:  coldmind
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  get_or_create        |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by mjtamlyn):

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


Comment:

 The documentation of `get_or_create` does devote a full paragraph and
 sample code to this, so I don't think there's much to improve.

 There is a case for an extension of the functionality which allows type-
 idempotent transforms such as unaccent or iexact, but I feel this will be
 super hard and prone to bugs. It's a possibility, but not worth keeping
 this lying around for.

 For longer discussion of why this ticket is being closed, see
 https://github.com/django/django/pull/4779

--
Ticket URL: <https://code.djangoproject.com/ticket/22728#comment:11>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0a938444275a9abe3e1ade366bedee38%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to