#10993: get_or_create should throw an exception if no lookup parameters are sent
------------------------------------------+---------------------------------
Reporter: gasull2 | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
Steps to reproduce: Use get_or_create with no lookup arguments but with
the argument defaults.
Expected behaviour: IMHO, it should either throw an exception ("No lookup
arguments" or similar) or actually create the object in the database.
What it happens instead: If you accidentally use get_or_create with no
lookup arguments, it returns the the new object created with the parameter
defaults, although the new object isn't saved in the database, and the
boolean returned is False (indicating that the object wasn't created).
--
Ticket URL: <http://code.djangoproject.com/ticket/10993>
Django <http://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
-~----------~----~----~----~------~----~------~--~---