#7789: get_or_create fails due to case sensivity
---------------------------------------+------------------------------------
Reporter: Julian Bez | Owner: nobody
Status: new | Milestone:
Component: Database wrapper | Version: SVN
Resolution: | Keywords: get_or_create iexact
exact
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------+------------------------------------
Comment (by nullie):
Well, it's more complex problem.
Real issue is: unique index is not case-sensitive, while __exact query is.
So, get_or_create doesn't get matching object (because query is case-
sensitive), tries to create new object and gets integrity error. It treats
as concurrency problem, due to
http://code.djangoproject.com/changeset/7289, and tries to get matching
object again, and again it fails.
It's related to http://code.djangoproject.com/ticket/7402
(http://code.djangoproject.com/changeset/7289 opened a can of worms)
--
Ticket URL: <http://code.djangoproject.com/ticket/7789#comment:2>
Django Code <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
-~----------~----~----~----~------~----~------~--~---