Display information that a problem has been found but ignored (and therefore the migration is considered ok)
This commit is contained in:
1 parent
aa8043db74
commit
85b9abdbc3
2 files changed
+37
-22
No files matched your search
@@ -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"}
|
||||
|
||||
Reference in new issue
Block a user