Skip to content

Commit

Permalink
Check is_optional for progress bar (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Aug 22, 2023
1 parent 8d6e826 commit b8ec63e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rdmo/projects/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def count_questions(parent_element, sets, conditions):
element_conditions = set(condition.id for condition in element.conditions.all())
if not element_conditions or element_conditions.intersection(conditions):
if isinstance(element, Question):
attributes.append(element.attribute)
count += 1
if not element.is_optional:
attributes.append(element.attribute)
count += 1
else:
if element.attribute:
attributes.append(element.attribute)
Expand Down

0 comments on commit b8ec63e

Please sign in to comment.