summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/migrations/operations/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py
index 2d75836da9..c0eb92a0ef 100644
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -161,7 +161,7 @@ class RenameModel(Operation):
# Get all of the related objects we need to repoint
all_related_objects = (
f for f in model._meta.get_fields(include_hidden=True)
- if f.auto_created and not f.concrete and not (f.hidden or f.many_to_many)
+ if f.auto_created and not f.concrete and (not f.hidden or f.many_to_many)
)
# Rename the model
state.models[app_label, self.new_name_lower] = state.models[app_label, self.old_name_lower]