Skip to content

Commit

Permalink
>= instead of > for financial_findings_local >= audited_expenditure_l…
Browse files Browse the repository at this point in the history
…ocal
  • Loading branch information
emaciupe committed Jun 7, 2024
1 parent f3b3a33 commit 99f97b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/etools/applications/audit/serializers/engagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ def _validate_financial_findings(self, validated_data):
if not audited_expenditure:
audited_expenditure = self.instance.audited_expenditure if self.instance else None

if audited_expenditure and financial_findings and financial_findings > audited_expenditure:
if audited_expenditure and financial_findings and financial_findings >= audited_expenditure:
raise serializers.ValidationError({'financial_findings': _('Cannot exceed Audited Expenditure')})

if not financial_findings_local:
financial_findings_local = self.instance.financial_findings_local if self.instance else None
if not audited_expenditure_local:
audited_expenditure_local = self.instance.audited_expenditure_local if self.instance else None

if audited_expenditure_local and financial_findings_local and financial_findings_local > audited_expenditure_local:
if audited_expenditure_local and financial_findings_local and financial_findings_local >= audited_expenditure_local:
raise serializers.ValidationError({'financial_findings_local': _('Cannot exceed Audited Expenditure Local')})

def validate(self, validated_data):
Expand Down

0 comments on commit 99f97b8

Please sign in to comment.