Skip to content

Commit

Permalink
remove temp var
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Aug 14, 2024
1 parent 4fc40be commit ea2bfb1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions calculation/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ def resolve_linked_class(parent, info, **kwargs):
# get the params from query
class_name_list = kwargs.get("class_name_list", None)
list_signal_result = get_linked_class(class_name_list=class_name_list)
for sr in list_signal_result:
if sr[1]:
result_linked_class = result_linked_class + sr[1]
result_linked_class = list(set(result_linked_class))
result_linked_class = list(set(list_signal_result))
# remove product when we have PaymentPlan/ContributionPlan object
# TODO: find a more generic way to avoid loop cause by relationship objects (product-calcule)
if 'PaymentPlan' in class_name_list or 'ContributionPlan' in class_name_list:
if 'Product' in result_linked_class:
result_linked_class.remove('Product')
# TODO: find a more generic way to avoid loop cause by relationship objects (product-calcule)
if class_name_list:
if 'PaymentPlan' in class_name_list or 'ContributionPlan' in class_name_list:
if 'Product' in result_linked_class:
result_linked_class.remove('Product')
if 'BenefitPlan' in result_linked_class:
result_linked_class.remove('BenefitPlan')
return LinkedClassListGQLType(result_linked_class)


Expand Down

0 comments on commit ea2bfb1

Please sign in to comment.