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:
committed by
Mariusz Felisiak
parent
225261b701
commit
4c0b4720b0
@@ -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 '
|
||||
|
||||
Reference in New Issue
Block a user