KeyError: 'carry_over_week' if preference is disabled #218

Closed
opened 2022-06-14 16:27:26 +02:00 by debdolph · 4 comments
debdolph commented 2022-06-14 16:27:26 +02:00 (Migrated from edugit.org)
Internal Server Error: /app/alsijil/lesson/2022/23/5278
Traceback (most recent call last):
  File "/usr/local/src/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/src/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/src/venv/lib/python3.9/site-packages/rules/contrib/views.py", line 231, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/usr/local/src/AlekSIS/apps/official/AlekSIS-App-Alsijil/aleksis/apps/alsijil/views.py", line 264, in register_object
    lesson_documentation_form.save()
  File "/usr/local/src/AlekSIS/apps/official/AlekSIS-App-Alsijil/aleksis/apps/alsijil/forms.py", line 61, in save
    self.cleaned_data["carry_over_week"]
KeyError: 'carry_over_week'
``` Internal Server Error: /app/alsijil/lesson/2022/23/5278 Traceback (most recent call last): File "/usr/local/src/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/src/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/src/venv/lib/python3.9/site-packages/rules/contrib/views.py", line 231, in _wrapped_view return view_func(request, *args, **kwargs) File "/usr/local/src/AlekSIS/apps/official/AlekSIS-App-Alsijil/aleksis/apps/alsijil/views.py", line 264, in register_object lesson_documentation_form.save() File "/usr/local/src/AlekSIS/apps/official/AlekSIS-App-Alsijil/aleksis/apps/alsijil/forms.py", line 61, in save self.cleaned_data["carry_over_week"] KeyError: 'carry_over_week' ```
debdolph commented 2022-06-14 16:27:26 +02:00 (Migrated from edugit.org)

assigned to @yuha

assigned to @yuha
yuha commented 2022-06-14 22:39:36 +02:00 (Migrated from edugit.org)

created branch 218-keyerror-carry_over_week-if-preference-is-disabled to address this issue

created branch [`218-keyerror-carry_over_week-if-preference-is-disabled`](/AlekSIS/official/AlekSIS-App-Alsijil/-/compare/master...218-keyerror-carry_over_week-if-preference-is-disabled) to address this issue
yuha commented 2022-06-14 22:39:47 +02:00 (Migrated from edugit.org)

mentioned in merge request !676

mentioned in merge request !676
nik (Migrated from edugit.org) closed this issue 2022-06-15 12:07:38 +02:00
nik commented 2022-06-15 12:07:40 +02:00 (Migrated from edugit.org)

mentioned in commit d1ff5e0de4

mentioned in commit d1ff5e0de4c3e6f5189b3e91f8b11707169c583b
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-App-Alsijil#218
No description provided.