#16137: .get behaviour is inconsisten with .get_or_create
---------------------------+----------------------------------------------
 Reporter:  wilfred@…      |          Owner:  nobody
     Type:  Uncategorized  |         Status:  new
Milestone:                 |      Component:  Database layer (models, ORM)
  Version:  1.3            |       Severity:  Normal
 Keywords:                 |   Triage Stage:  Unreviewed
Has patch:  0              |  Easy pickings:  0
---------------------------+----------------------------------------------
 It's really useful to be able to do

 {{{ MyModel.objects.get() }}}

 when you've got a singleton model. Sadly, .get_or_create doesn't allow you
 to call it in the same way:

 {{{ MyModel.objects.get_or_create() }}}

 This throws an AssertionError "get_or_create() must be passed at least one
 keyword argument". Could this requirement be dropped?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16137>
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