diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-06-05 23:34:13 -0700 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-06-05 23:34:44 -0700 |
| commit | 7d388956cecf02fa84939ab913b594cd96462302 (patch) | |
| tree | e4a09901596675b97c51f5b4ec3209936b842e5d | |
| parent | 9f1c4e4d3f997dea150d19ca43d2471d66def120 (diff) | |
[1.7.x] Prevent operation pollution by later operations of fields
| -rw-r--r-- | django/db/migrations/operations/models.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py index 76ec83c40e..06ad280be6 100644 --- a/django/db/migrations/operations/models.py +++ b/django/db/migrations/operations/models.py @@ -21,7 +21,13 @@ class CreateModel(Operation): self.bases = bases or (models.Model,) def state_forwards(self, app_label, state): - state.models[app_label, self.name.lower()] = ModelState(app_label, self.name, self.fields, self.options, self.bases) + state.models[app_label, self.name.lower()] = ModelState( + app_label, + self.name, + list(self.fields), + dict(self.options), + tuple(self.bases), + ) def database_forwards(self, app_label, schema_editor, from_state, to_state): apps = to_state.render() |
