You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have apps in your Django project that do not have migrations (i.e. apps without any data models), running the migrations causes this error:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/test.py", line 23, in run_from_argv
super().run_from_argv(argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/test.py", line 53, in handle
failures = test_runner.run_tests(test_labels)
File "/usr/local/lib/python3.7/site-packages/django/test/runner.py", line 632, in run_tests
self.run_checks()
File "/usr/local/lib/python3.7/site-packages/django/test/runner.py", line 570, in run_checks
call_command('check', verbosity=self.verbosity)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 148, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/check.py", line 64, in handle
fail_level=getattr(checks, options['fail_level']),
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 390, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/local/lib/python3.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python3.7/site-packages/django_linear_migrations/apps.py", line 81, in check_max_migration_files
migration_details = MigrationDetails(app_label)
File "/usr/local/lib/python3.7/site-packages/django_linear_migrations/apps.py", line 43, in __init__
self.migrations_module = import_module(self.migrations_module_name)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 118, in import_module
if name.startswith('.'):
AttributeError: 'NoneType' object has no attribute 'startswith'
From looking at the DLM source code, it seems that a None value for the migrations module isn't handled correctly.
In apps.py:43 it tries to import the migrations module even if that app doesn't have one.
The text was updated successfully, but these errors were encountered:
When you have apps in your Django project that do not have migrations (i.e. apps without any data models), running the migrations causes this error:
From looking at the DLM source code, it seems that a
None
value for the migrations module isn't handled correctly.In
apps.py:43
it tries to import the migrations module even if that app doesn't have one.The text was updated successfully, but these errors were encountered: