Do not lint migrations on dry_run
If the migration file is not generated, we're not able yet to generate the associated SQL. That'll come in a later version :)
This commit is contained in:
1 parent
6e8df8fb66
commit
bf790a0591
1 file changed
+3
@@ -30,11 +30,14 @@ class Command(MakeMigrationsCommand):
|
||||
|
||||
def write_migration_files(self, changes):
|
||||
super(Command, self).write_migration_files(changes)
|
||||
|
||||
if (
|
||||
not getattr(settings, "MIGRATION_LINTER_OVERRIDE_MAKEMIGRATIONS", False)
|
||||
and not self.lint
|
||||
):
|
||||
return
|
||||
if self.dry_run:
|
||||
return
|
||||
|
||||
# Lint migrations
|
||||
linter = MigrationLinter(
|
||||
|
||||
Reference in new issue
Block a user