polymorphic.utils

polymorphic.utils.reset_polymorphic_ctype(*models, **filters)

Set the polymorphic content-type ID field to the proper model Sort the *models from base class to descending class, to make sure the content types are properly assigned.

Add preserve_existing=True to skip models which already have a polymorphic content type.