Skip to content

Commit

Permalink
Merge pull request #29 from openimis/fix/add-get_calculation_object
Browse files Browse the repository at this point in the history
get_calculation_object
  • Loading branch information
delcroip authored May 8, 2022
2 parents c2b9ff9 + 98bbe59 commit 6243e9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions calculation/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def get_rule_details(class_name):
list_rule_details.extend(result_signal)
return list_rule_details

def get_calculation_object(uuid):
for calculation_rule in CALCULATION_RULES:
if str(calculation_rule.uuid) == str(uuid):
return calculation_rule

def run_calculation_rules(instance, context, user, **kwargs):
for calculation_rule in CALCULATION_RULES:
Expand Down

0 comments on commit 6243e9d

Please sign in to comment.