Internal Server Error when adding substitution
On sis2.c-b-e-s.de
, entering substitutions currently raises an internal server error.
Internal Server Error: /django/app/chronos/lessons/642/12/substitution/
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/django/views/decorators/cache.py", line 62, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/rules/contrib/views.py", line 231, in _wrapped_view
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aleksis/apps/chronos/views.py", line 295, in edit_substitution
if edit_substitution_form.is_valid():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/django/forms/forms.py", line 205, in is_valid
return self.is_bound and not self.errors
^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/django/forms/forms.py", line 200, in errors
self.full_clean()
File "/usr/local/lib/python3.11/dist-packages/django/forms/forms.py", line 439, in full_clean
self._post_clean()
File "/usr/local/lib/python3.11/dist-packages/django/forms/models.py", line 492, in _post_clean
self.instance.full_clean(exclude=exclude, validate_unique=False)
File "/usr/local/lib/python3.11/dist-packages/django/db/models/base.py", line 1472, in full_clean
self.validate_constraints(exclude=exclude)
File "/usr/local/lib/python3.11/dist-packages/django/db/models/base.py", line 1423, in validate_constraints
constraint.validate(model_class, self, exclude=exclude, using=using)
File "/usr/local/lib/python3.11/dist-packages/django/db/models/constraints.py", line 92, in validate
if not Q(self.check).check(against, using=using):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/django/db/models/query_utils.py", line 141, in check
return compiler.execute_sql(SINGLE) is not None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/cachalot/monkey_patch.py", line 37, in inner
return original(compiler, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/cachalot/monkey_patch.py", line 92, in inner
table_cache_keys = _get_table_cache_keys(compiler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/cachalot/utils.py", line 276, in _get_table_cache_keys
for t in _get_tables(db_alias, compiler.query, compiler)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/cachalot/utils.py", line 220, in _get_tables
tables.add(query.get_meta().db_table)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'db_table'