Error 500 while trying to edit episode
I did a clean install of latest aura-web and created an episode for the default "Musikprogramm" entry.
The entry was added to the calendar as expected.
While trying to edit the episode by clicking on its calendar item, I got this error message:
docker compose logs:
dashboard | 2024-02-22T15:51:52.106495648Z 192.168.160.5 - - [22/Feb/2024:16:51:52 +0100] "GET /assets/useSortable-48a7f235.js HTTP/1.1" 304 0 "https://aura.crispybits.app/shows/1/episodes" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15" "192.168.1.130"
steering | 2024-02-22T15:51:52.161397526Z ERROR:django.request:Internal Server Error: /api/v1/notes/
steering | 2024-02-22T15:51:52.161422683Z Traceback (most recent call last):
steering | 2024-02-22T15:51:52.161427963Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/fields/__init__.py", line 2053, in get_prep_value
steering | 2024-02-22T15:51:52.161432822Z return int(value)
steering | 2024-02-22T15:51:52.161436830Z ^^^^^^^^^^
steering | 2024-02-22T15:51:52.161440868Z ValueError: invalid literal for int() with base 10: 'v1'
steering | 2024-02-22T15:51:52.161444935Z
steering | 2024-02-22T15:51:52.161449514Z The above exception was the direct cause of the following exception:
steering | 2024-02-22T15:51:52.161453732Z
steering | 2024-02-22T15:51:52.161457659Z Traceback (most recent call last):
steering | 2024-02-22T15:51:52.161462208Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
steering | 2024-02-22T15:51:52.161468580Z response = get_response(request)
steering | 2024-02-22T15:51:52.161472638Z ^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161476555Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
steering | 2024-02-22T15:51:52.161480943Z response = wrapped_callback(request, *callback_args, **callback_kwargs)
steering | 2024-02-22T15:51:52.161496032Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161500801Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
steering | 2024-02-22T15:51:52.161505239Z return view_func(*args, **kwargs)
steering | 2024-02-22T15:51:52.161509146Z ^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161513134Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/viewsets.py", line 125, in view
steering | 2024-02-22T15:51:52.161517542Z return self.dispatch(request, *args, **kwargs)
steering | 2024-02-22T15:51:52.161521550Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161525557Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
steering | 2024-02-22T15:51:52.161529946Z response = self.handle_exception(exc)
steering | 2024-02-22T15:51:52.161533873Z ^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161538822Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
steering | 2024-02-22T15:51:52.161544884Z self.raise_uncaught_exception(exc)
steering | 2024-02-22T15:51:52.161550905Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
steering | 2024-02-22T15:51:52.161557177Z raise exc
steering | 2024-02-22T15:51:52.161563549Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
steering | 2024-02-22T15:51:52.161568278Z response = handler(request, *args, **kwargs)
steering | 2024-02-22T15:51:52.161572346Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161576323Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/drf_spectacular/drainage.py", line 207, in wrapped_method
steering | 2024-02-22T15:51:52.161580711Z return method(self, request, *args, **kwargs)
steering | 2024-02-22T15:51:52.161585681Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161591421Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/mixins.py", line 19, in create
steering | 2024-02-22T15:51:52.161597643Z self.perform_create(serializer)
steering | 2024-02-22T15:51:52.161602823Z File "/app/program/views.py", line 745, in perform_create
steering | 2024-02-22T15:51:52.161606921Z serializer.save(timeslot=self._get_timeslot())
steering | 2024-02-22T15:51:52.161610868Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/rest_framework/serializers.py", line 212, in save
steering | 2024-02-22T15:51:52.161615096Z self.instance = self.create(validated_data)
steering | 2024-02-22T15:51:52.161619154Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161623352Z File "/app/program/serializers.py", line 1023, in create
steering | 2024-02-22T15:51:52.161633050Z timeslot_pk = TimeSlot.objects.get(pk=self.context["request"].path.split("/")[-3])
steering | 2024-02-22T15:51:52.161637609Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161641736Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method
steering | 2024-02-22T15:51:52.161646866Z return getattr(self.get_queryset(), name)(*args, **kwargs)
steering | 2024-02-22T15:51:52.161652988Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161658809Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/query.py", line 623, in get
steering | 2024-02-22T15:51:52.161665281Z clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs)
steering | 2024-02-22T15:51:52.161671252Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161676632Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/query.py", line 1436, in filter
steering | 2024-02-22T15:51:52.161681381Z return self._filter_or_exclude(False, args, kwargs)
steering | 2024-02-22T15:51:52.161685499Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161689867Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/query.py", line 1454, in _filter_or_exclude
steering | 2024-02-22T15:51:52.161694265Z clone._filter_or_exclude_inplace(negate, args, kwargs)
steering | 2024-02-22T15:51:52.161698443Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/query.py", line 1461, in _filter_or_exclude_inplace
steering | 2024-02-22T15:51:52.161702791Z self._query.add_q(Q(*args, **kwargs))
steering | 2024-02-22T15:51:52.161742176Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/sql/query.py", line 1546, in add_q
steering | 2024-02-22T15:51:52.161768034Z clause, _ = self._add_q(q_object, self.used_aliases)
steering | 2024-02-22T15:51:52.161773284Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161777041Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/sql/query.py", line 1577, in _add_q
steering | 2024-02-22T15:51:52.161781410Z child_clause, needed_inner = self.build_filter(
steering | 2024-02-22T15:51:52.161785027Z ^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161788814Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/sql/query.py", line 1492, in build_filter
steering | 2024-02-22T15:51:52.161792711Z condition = self.build_lookup(lookups, col, value)
steering | 2024-02-22T15:51:52.161796338Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161799784Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/sql/query.py", line 1319, in build_lookup
steering | 2024-02-22T15:51:52.161817498Z lookup = lookup_class(lhs, rhs)
steering | 2024-02-22T15:51:52.161821024Z ^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161824581Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/lookups.py", line 27, in __init__
steering | 2024-02-22T15:51:52.161828478Z self.rhs = self.get_prep_lookup()
steering | 2024-02-22T15:51:52.161831945Z ^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161835502Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/lookups.py", line 341, in get_prep_lookup
steering | 2024-02-22T15:51:52.161839890Z return super().get_prep_lookup()
steering | 2024-02-22T15:51:52.161843206Z ^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161846522Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/lookups.py", line 85, in get_prep_lookup
steering | 2024-02-22T15:51:52.161850139Z return self.lhs.output_field.get_prep_value(self.rhs)
steering | 2024-02-22T15:51:52.161853506Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
steering | 2024-02-22T15:51:52.161859587Z File "/app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/fields/__init__.py", line 2055, in get_prep_value
steering | 2024-02-22T15:51:52.161863444Z raise e.__class__(
steering | 2024-02-22T15:51:52.161868063Z ValueError: Field 'id' expected a number but got 'v1'.
steering | 2024-02-22T15:51:53.088888973Z /app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/fields/__init__.py:1595: RuntimeWarning: DateTimeField TimeSlot.start received a naive datetime (2024-02-22 16:51:53.088526) while time zone support is active.
steering | 2024-02-22T15:51:53.088913590Z warnings.warn(
steering | 2024-02-22T15:51:59.151203482Z /app/.cache/virtualenvs/steering-9TtSrW0h-py3.11/lib/python3.11/site-packages/django/db/models/fields/__init__.py:1595: RuntimeWarning: DateTimeField TimeSlot.star