From c4e372aaf467ae41315cfe56a718a80469fc5318 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 14 Dec 2015 01:20:10 -0500 Subject: Fixed #25852 -- Made sure AlterModelManager forces a reload of its model state. Thanks to Geoffrey Sechter and the Django NYC group for the report and Markus for the review. --- django/db/migrations/operations/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'django') diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py index 2855107e0e..eabffa1b7d 100644 --- a/django/db/migrations/operations/models.py +++ b/django/db/migrations/operations/models.py @@ -590,6 +590,7 @@ class AlterModelManagers(Operation): def state_forwards(self, app_label, state): model_state = state.models[app_label, self.name_lower] model_state.managers = list(self.managers) + state.reload_model(app_label, self.name_lower) def database_forwards(self, app_label, schema_editor, from_state, to_state): pass -- cgit v1.3