Simplify passing migration object directly into analysing data migration
This commit is contained in:
1 parent
553ed41cc4
commit
a0e7ca099b
1 file changed
+2
-5
@@ -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 = []
|
||||||
|
|||||||
Reference in new issue
Block a user