Skip to content

Commit

Permalink
Fix count_questions for progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Dec 10, 2023
1 parent d7f4f88 commit 34e1160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdmo/projects/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def count_questions(element, sets, conditions):
if isinstance(child, Question):
# for questions add the set_count to the counts dict
# use the max function, since the same attribute could apear twice in the tree
if child.attribute is not None:
if child.attribute is not None and not child.is_optional:
counts[child.attribute.id] = max(counts[child.attribute.id], set_count)
else:
# for everthing else, call this function recursively
Expand Down

0 comments on commit 34e1160

Please sign in to comment.