summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/apps/registry.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/apps/registry.py b/django/apps/registry.py
index 62650ca4bc..268e1a6af7 100644
--- a/django/apps/registry.py
+++ b/django/apps/registry.py
@@ -286,13 +286,14 @@ class Apps:
change after Django has loaded the settings, there is no reason to get
the respective settings attribute over and over again.
"""
+ to_string = to_string.lower()
for model in self.get_models(include_swapped=True):
swapped = model._meta.swapped
# Is this model swapped out for the model given by to_string?
- if swapped and swapped == to_string:
+ if swapped and swapped.lower() == to_string:
return model._meta.swappable
# Is this model swappable and the one given by to_string?
- if model._meta.swappable and model._meta.label == to_string:
+ if model._meta.swappable and model._meta.label_lower == to_string:
return model._meta.swappable
return None