Skip to content

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
katie-gardner committed Dec 14, 2023
1 parent c784f05 commit a75cac1
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def validate_calculated_summaries(self):
)
)
for calculated_summary_id in self.calculated_summaries_to_calculate:
if is_calculated_summary_repeating := self.questionnaire_schema.is_block_in_repeating_section(
if self.questionnaire_schema.is_block_in_repeating_section(
calculated_summary_id
):
self._validate_repeating_calculated_summary_in_grand_calculated_summary(
Expand All @@ -112,11 +112,7 @@ def validate_calculated_summaries(self):
"id"
],
)

if (
is_grand_calculated_summary_repeating
and not is_calculated_summary_repeating
):
elif is_grand_calculated_summary_repeating:
list_name = grand_calculated_summary_section["repeat"]["for_list"]
self._validate_static_calculated_summary_in_repeating_grand_calculated_summary(
list_name=list_name, calculated_summary_id=calculated_summary_id
Expand Down

0 comments on commit a75cac1

Please sign in to comment.