Listing leftover content types for missing models breaks admin
|Reported by:||Ivan Sagalaev||Owned by:||Ivan Sagalaev|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If during the lifecycle of the project some models got removed and their registered content types still remain in the DB the admin (or any such code for that matter) crashes trying to display content types. This happens due to
ContenType.__unicode__ relying on
self.model_class() to be always available. This is a recent regression from .