Verified Commit 63bfa31d authored by Hueser, Christian (FWCC) - 138593's avatar Hueser, Christian (FWCC) - 138593
Browse files

Skip removing of answers if ID is not existing

* Method remove_answers of class Question need to skip deletion of
answers if the participant ID is not (anymore) existing in dictionary of
answers given.
parent 9f9afe33
Pipeline #100814 passed with stage
in 54 seconds
......@@ -188,7 +188,8 @@ class Question(YamlConstructable, Identifiable):
Invalid IDs are ignored.
"""
for participant_id in participant_ids:
del self._answers[participant_id]
if participant_id in self._answers:
del self._answers[participant_id]
@property
def answers(self) -> Dict[str, Optional[object]]: # NOTE (0) below
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment