Simplify passing migration object directly into analysing data migration

This commit is contained in:
David Wobrock committed 2020-02-07 23:29:15 +01:00
1 parent 553ed41cc4
commit a0e7ca099b
1 file changed
+2 -5
+2 -5
View File
@@ -137,9 +137,7 @@ class MigrationLinter(object):
self.exclude_migration_tests, self.exclude_migration_tests,
) )
err, ignored_data, warnings = self.analyse_data_migration( err, ignored_data, warnings = self.analyse_data_migration(migration)
app_label, migration_name
)
if err: if err:
errors += err errors += err
if ignored_data: if ignored_data:
@@ -369,8 +367,7 @@ class MigrationLinter(object):
) )
) )
def analyse_data_migration(self, app_label, migration_name): def analyse_data_migration(self, migration):
migration = self.migration_loader.disk_migrations[(app_label, migration_name)]
errors = [] errors = []
ignored = [] ignored = []
warnings = [] warnings = []