Skip to content

Commit

Permalink
get_calculation_object
Browse files Browse the repository at this point in the history
add get_calculation_object function
  • Loading branch information
delcroip committed May 8, 2022
1 parent 15db097 commit 98bbe59
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):
for calculation_rule in CALCULATION_RULES:
Expand Down

0 comments on commit 98bbe59

Please sign in to comment.