diff --git a/calculation/calculation_rule.py b/calculation/calculation_rule.py index 6fa1374..d2ee88c 100644 --- a/calculation/calculation_rule.py +++ b/calculation/calculation_rule.py @@ -10,6 +10,7 @@ from policyholder.models import PolicyHolderInsuree from uuid import UUID + class ContributionValuationRule(AbsStrategy): version = 1 uuid = "0e1b6dd4-04a0-4ee6-ac47-2a99cfa5e9a8" @@ -112,7 +113,6 @@ def calculate(cls, instance, **kwargs): )) else: return [instance.contract_details.insuree] - elif context == 'validity': validity_from = kwargs.get('validity_from', None) validity_to = kwargs.get('validity_to', None) @@ -123,8 +123,6 @@ def calculate(cls, instance, **kwargs): contract = instance.contract_details.contract if instance.__class__.__name__ == "ContractDetails": contract = instance.contract - - if contract: validity_from = validity_from or contract.date_valid_from validity_to = validity_to or contract.date_valid_to