Running migrations:
Applying ldap.0001_preferences...Traceback (most recent call last):
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/query.py", line 581, in get_or_create
return self.get(**kwargs), False
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
raise self.model.DoesNotExist(
__fake__.DoesNotExist: SitePreferenceModel matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/www/aleksis/venv/bin/aleksis-admin", line 8, in <module>
sys.exit(aleksis_cmd())
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/aleksis/core/__main__.py", line 14, in aleksis_cmd
execute_from_command_line(sys.argv)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 244, in handle
post_migrate_state = executor.migrate(
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
state = migration.apply(state, schema_editor)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/migrations/migration.py", line 126, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/aleksis/apps/ldap/migrations/0001_preferences.py", line 28, in _migrate_preferences
SitePreferenceModel.objects.update_or_create(
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/query.py", line 608, in update_or_create
obj, created = self.select_for_update().get_or_create(defaults, **kwargs)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/query.py", line 588, in get_or_create
return self.create(**params), True
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/query.py", line 451, in create
obj = self.model(**kwargs)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/base.py", line 485, in __init__
_setattr(self, field.name, rel_obj)
File "/srv/www/aleksis/venv/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 215, in __set__
raise ValueError(
ValueError: Cannot assign "1": "SitePreferenceModel.instance" must be a "Site" instance.