#18896: get_or_create breaks for ManyToMany
-------------------------------------+-------------------------------------
Reporter: mattlong | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.4
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by thikonom):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I think the problem here is the '''unique=True''' constraint. I
reproduced your code using Mysql, it failed with an ''"Duplicate entry
'foo' for key 'text'"'' Integrityerror, but when i removed the unique
constraint then it worked as expected.
--
Ticket URL: <https://code.djangoproject.com/ticket/18896#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 https://groups.google.com/groups/opt_out.