mirror of
https://github.com/django/django.git
synced 2024-11-29 22:56:46 +01:00
Fixed #22325: Ignore __first__ dependencies to your own app
This commit is contained in:
parent
5182efce8d
commit
5400b29ebf
@ -201,7 +201,10 @@ class MigrationLoader(object):
|
||||
# makemigrations to declare dependencies on apps before they
|
||||
# even have migrations.
|
||||
if parent[1] == "__first__" and parent not in self.graph:
|
||||
if parent[0] in self.unmigrated_apps:
|
||||
if parent[0] == key[0]:
|
||||
# Ignore __first__ references to the same app (#22325)
|
||||
continue
|
||||
elif parent[0] in self.unmigrated_apps:
|
||||
# This app isn't migrated, but something depends on it.
|
||||
# The models will get auto-added into the state, though
|
||||
# so we're fine.
|
||||
|
Loading…
Reference in New Issue
Block a user