diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/migrations/autodetector.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py index 97977d72ef..bf9c2acd26 100644 --- a/django/db/migrations/autodetector.py +++ b/django/db/migrations/autodetector.py @@ -96,7 +96,7 @@ class MigrationAutodetector: for name, field in sorted(fields.items()): deconstruction = self.deep_deconstruct(field) if field.remote_field and field.remote_field.model: - del deconstruction[2]['to'] + deconstruction[2].pop('to', None) fields_def.append(deconstruction) return fields_def |
