Open phillipuniverse opened 1 year ago
Hi @phillipuniverse
Thanks for the report! That's indeed something the linter should support. I'll try to look into it and review https://github.com/3YOURMIND/django-migration-linter/pull/248 soon :)
Ran into this as well!
Here's a screenshot from the Pycharm debugger that shows the issue
The migration linter is checking for a migration with a tuple
("netsuite", "0012_added_netsuite_suiteapp_config")
against the Djangodisk_migrations
(self.migration_loader
is the DjangoMigrationLoader
).This migration linter assumes that "netsuite" is a valid app name for Django. But it's not - Django doesn't know about an app called
netsuite
, it knows about one calledintegrations_netsuite
. This is because we renamed it in a customAppConfig
inapps.py
:So the root issue is that the linter doesn't look truly at app labels, it only looks at folder structures.
This appears to only be an issue when used in concert with the git commit id.
Fix for this issue is at #248 which takes the folder structure and converts it to the real Django app without assumptions about naming.