Commits

Andrew Godwin committed a5d05ae

Fix #253: Freeze proxy models' parents.

Comments (0)

Files changed (1)

south/management/commands/startmigration.py

         
         # Fill out frozen model definitions
         for model, last_models in frozen_models.items():
+            # Non-proxies get a standard freeze
             if not (hasattr(model._meta, "proxy") and model._meta.proxy):
                 all_models[model_key(model)] = prep_for_freeze(model, last_models)
+            # Proxy models' parents are frozen
+            else:
+                model = model._meta.proxy_for_model
+                all_models[model_key(model)] = prep_for_freeze(model, last_models)
         
         # Do some model cleanup, and warnings
         for modelname, model in all_models.items():