Display information that a problem has been found but ignored (and therefore the migration is considered ok)

This commit is contained in:
David Wobrock committed 2019-07-28 12:28:56 +02:00
1 parent aa8043db74
commit 85b9abdbc3
2 files changed
+37 -22

No files matched your search

+8 -2
View File
@@ -121,10 +121,16 @@ class MigrationLinter(object):
sql_statements = self.get_sql(app_label, migration_name)
exclude_migration_tests = self.exclude_migration_tests or []
errors = analyse_sql_statements(sql_statements, exclude_migration_tests)
errors, ignored = analyse_sql_statements(
sql_statements, exclude_migration_tests
)
if not errors:
print("OK")
if ignored:
print("OK (ignored)")
self.print_errors(ignored)
else:
print("OK")
self.nb_valid += 1
if self.should_use_cache():
self.new_cache[md5hash] = {"result": "OK"}