#3121: RelatedManager.get_or_create() does not work
------------------------------+---------------------------------------------
Reporter: akaihola | Owner: adrian
Type: defect | Status: new
Priority: normal | Milestone:
Component: Database wrapper | Version: SVN
Severity: normal | Resolution:
Keywords: |
------------------------------+---------------------------------------------
Comment (by Brian Beck):
This bug also affects generic relation managers (see #2316}).
I tried to debug this, but it's pretty elusive. I think the solution might
be to define get_or_create in the subclass anywhere create is also defined
in the subclass. For instance, GenericRelatedObjectManager and
ManyRelatedManager (among others, perhaps) both define a create method,
but no get_or_create method. get_or_create is not defined to actually call
its own class's create method (in QuerySet for instance, it duplicates
create's code).
--
Ticket URL: <http://code.djangoproject.com/ticket/3121#comment:>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---