Skip to content
Snippets Groups Projects
Verified Commit cc68a9bf authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix KeyError while printing out full register with persons without personal notes

parent c92c1074
No related branches found
No related tags found
1 merge request!296Resolve "Print view fails sometimes with KeyError"
Pipeline #85301 failed
......@@ -13,6 +13,7 @@ Fixed
~~~~~
* Register absence form wasn't accessible without direct access to class register.
* Printing the full group register failed when a person had no personal notes.
`2.1`_ - 2022-06-25
-------------------
......
......@@ -736,7 +736,7 @@ def full_register_group(request: HttpRequest, id_: int) -> HttpResponse:
prefetched_persons = []
for person in persons:
person.filtered_notes = sorted_personal_notes["person"][person.pk]
person.filtered_notes = sorted_personal_notes["person"].get(person.pk, [])
prefetched_persons.append(person)
context["school_term"] = group.school_term
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment