1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #31954 -- Fixed migration optimization for MTI model creation with parent model with mixed case app label.

This commit is contained in:
Koen De Wit
2020-08-27 15:07:37 +02:00
committed by Mariusz Felisiak
parent 225261b701
commit 4c0b4720b0
2 changed files with 22 additions and 1 deletions

View File

@@ -19,7 +19,8 @@ def resolve_relation(model, app_label=None, model_name=None):
)
return app_label, model_name
if '.' in model:
return tuple(model.lower().split('.', 1))
app_label, model_name = model.split('.', 1)
return app_label, model_name.lower()
if app_label is None:
raise TypeError(
'app_label must be provided to resolve unscoped model '