Skip to content

Commit

Permalink
Merge pull request #55 from openimis/release/24.04
Browse files Browse the repository at this point in the history
MERGING release/24.04 into develop
  • Loading branch information
delcroip authored May 1, 2024
2 parents e9fbd93 + b8dc4bf commit b37ab5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion calculation/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def run_calculation_rules(instance, context, user, **kwargs):
result_signal = calculation_rule.signal_calculate_event.send(
sender=instance.__class__.__name__, instance=instance, user=user, context=context, **kwargs
)
if result_signal[0][1]:
if result_signal and len(result_signal) and result_signal[0][1]:
return result_signal

# if no listened calculation rules - return None
return None

Expand Down

0 comments on commit b37ab5b

Please sign in to comment.