#10827: django.auth create_permissions must clear the content type cache before creating permissions -------------------------------------+-------------------------------------- Reporter: seanl | Owner: nobody Status: new | Milestone: Component: Authentication | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------+-------------------------------------- Comment (by Jason Yan <tailofthe...@gmail.com>):
I just got hit by this same issue and worked around it in a similar manner. I instead removed the signal that was connected to update_contenttypes and moved the update_contenttypes call to django.core.management.commands.flush. For anyone that might be possibly searching for this, here's the exception from the tests without the fix: {{{ IntegrityError: insert or update on table "auth_permission" violates foreign key constraint "content_type_id_refs_id_728de91f" DETAIL: Key (content_type_id)=(2) is not present in table "django_content_type". }}} -- Ticket URL: <http://code.djangoproject.com/ticket/10827#comment:3> 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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.