#16137: .get behaviour is inconsisten with .get_or_create
-------------------------------------+-------------------------------------
               Reporter:  wilfred@…  |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |      Component:  Database layer
              Milestone:             |  (models, ORM)
                Version:  1.3        |       Severity:  Normal
             Resolution:             |       Keywords:
           Triage Stage:  Accepted   |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The check is enforced at the very beginning of
 `django.db.models.query.get_or_create()`:

 {{{
         assert kwargs, 'get_or_create() must be passed at least one
 keyword argument'
 }}}

 This line has been there, unchanged, since the merge of queryset-refactor.
 Actually, it was even in the initial proposal by Adrian:
 https://groups.google.com/group/django-developers/msg/1c39b286a3e9e2cb

 As far as I can tell, it is not necessary.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16137#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to