#19345: ContentType.objects.get_for_model shouldn't create missing content types ------------------------------------------------+------------------------ Reporter: aaugustin | Owner: nobody Type: Bug | Status: new Component: contrib.contenttypes | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ------------------------------------------------+------------------------ This behavior is very unexpected, given the name of the method.
In general, this isn't an issue because content types always exist — they're created in `post_syncdb`. I encountered the problem while debugging multiple databases issues involving `syncdb` (#16039). The `post_syncdb` handler that creates permissions looks for content types, creating them as a side effect. Since I was attempting to test that the content types weren't created, my test failed in a very unexpected fashion. -- Ticket URL: <https://code.djangoproject.com/ticket/19345> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.