Błąd "Cannot resolve bases for ModelState" podczas uruchomienia migracji na produkcji

0

Witam serdecznie.

Próbuje wykonać migracje na produkcji i wyskakuje mi blad.

Lokalnie to przechodzi - tylko na produkcji mam taki błąd. Czy ktoś wie czemu?

(venv) hubert@vps-31dff1d1:~/monkey-shop.pl$ python3 manage.py migrate --run-syncdb
Operations to perform:
  Synchronize unmigrated apps: messages, monkeyShop, staticfiles
  Apply all migrations: admin, auth, contenttypes, sessions
Traceback (most recent call last):
  File "/home/hubert/monkey-shop.pl/manage.py", line 22, in <module>
    main()
  File "/home/hubert/monkey-shop.pl/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/home/hubert/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/core/management/base.py", line 96, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 295, in handle
    pre_migrate_apps = pre_migrate_state.apps
  File "/home/hubert/.local/lib/python3.10/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/db/migrations/state.py", line 566, in apps
    return StateApps(self.real_apps, self.models)
  File "/home/hubert/.local/lib/python3.10/site-packages/django/db/migrations/state.py", line 627, in __init__
    self.render_multiple([*models.values(), *self.real_models])
  File "/home/hubert/.local/lib/python3.10/site-packages/django/db/migrations/state.py", line 669, in render_multiple
    raise InvalidBasesError(
django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for [<ModelState: 'monkeyShop.ShopUser'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
 in an app with no migrations; see https://docs.djangoproject.com/en/4.1/topics/migrations/#dependencies for more
0

ruszyło po dodaniu pliku __init__.py w folderze migrations

1 użytkowników online, w tym zalogowanych: 0, gości: 1