Description

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.

Oldest firstNewest firstThreaded

Comments only

Change History (3)

Seems that this behavior is fully intentional and long standing based on code comments and git-blame.

Given that as you say - this is mostly a non-issue either way under normal usage, and there is a slim chance that the backwards incompatible change to raise an error could cause some edge case breakage - wouldn't it be better to leave as is and just access the ContentType model through standard manager methods?