Skip to content

Commit

Permalink
use related ref
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Oct 30, 2024
1 parent e22dcee commit e320d27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calculation/calculation_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ContributionValuationRule(AbsStrategy):
def active_for_object(cls, instance, context, type='account_receivable', sub_type='contribution'):
return (
instance.__class__.__name__ == "ContractContributionPlanDetails"
and context in ["value", "members", "validity"]
and context in ["value", "members", "validity"]
) and cls.check_calculation(instance)

@classmethod
Expand All @@ -46,8 +46,8 @@ def check_calculation(cls, instance):
elif class_name == "ContributionPlan":
match = UUID(str(cls.uuid)) == UUID(str(instance.calculation))
elif class_name == "ContributionPlanBundle":
list_cpbd = list(ContributionPlanBundleDetails.objects.filter(
contribution_plan_bundle=instance
list_cpbd = list(instance.contributionplanbundledetails_set.filter(
is_deleted=False
))
for cpbd in list_cpbd:
if match is False:
Expand Down

0 comments on commit e320d27

Please sign in to comment.