Unrelated: handle migration files gathered from git command that are not in the installed_apps
This commit is contained in:
1 parent
c2c26ae106
commit
ef38433bb8
1 file changed
+12
-2
@@ -331,8 +331,18 @@ class MigrationLinter(object):
|
|||||||
if self.is_migration_file(line):
|
if self.is_migration_file(line):
|
||||||
app_label, name = split_migration_path(line)
|
app_label, name = split_migration_path(line)
|
||||||
if migrations_list is None or (app_label, name) in migrations_list:
|
if migrations_list is None or (app_label, name) in migrations_list:
|
||||||
migration = self.migration_loader.disk_migrations[app_label, name]
|
if (app_label, name) in self.migration_loader.disk_migrations:
|
||||||
migrations.append(migration)
|
migration = self.migration_loader.disk_migrations[
|
||||||
|
app_label, name
|
||||||
|
]
|
||||||
|
migrations.append(migration)
|
||||||
|
else:
|
||||||
|
logger.info(
|
||||||
|
"Found migration file (%s, %s) "
|
||||||
|
"that is not present in loaded migration.",
|
||||||
|
app_label,
|
||||||
|
name,
|
||||||
|
)
|
||||||
diff_process.wait()
|
diff_process.wait()
|
||||||
|
|
||||||
if diff_process.returncode != 0:
|
if diff_process.returncode != 0:
|
||||||
|
|||||||
Reference in new issue
Block a user