#26638: Allow callable in defaults argument for QuerySet.get_or_create
-------------------------------------+-------------------------------------
     Reporter:  mlorant              |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by ddsnowboard):

 I sent a pull request that solves this
 (https://github.com/django/django/pull/6650). My understanding of the
 ticket is that it should evaluate the callable if and only if the object
 needs to be created, and that's what the code does. Is that right?

 Also, it passes all the tests under SQLite.

--
Ticket URL: <https://code.djangoproject.com/ticket/26638#comment:3>
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.7b70c49f3afb333630c3b5208907cdc2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to