Unrelated: handle migration files gathered from git command that are not in the installed_apps

This commit is contained in:
David Wobrock committed 2020-07-02 19:15:30 +02:00
1 parent c2c26ae106
commit ef38433bb8
1 file changed
+12 -2
+12 -2
View File
@@ -331,8 +331,18 @@ class MigrationLinter(object):
if self.is_migration_file(line):
app_label, name = split_migration_path(line)
if migrations_list is None or (app_label, name) in migrations_list:
migration = self.migration_loader.disk_migrations[app_label, name]
migrations.append(migration)
if (app_label, name) in self.migration_loader.disk_migrations:
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()
if diff_process.returncode != 0: