Skip to content

Commit

Permalink
fix: added type check for exclusion report on snapshot (#2855)
Browse files Browse the repository at this point in the history
Co-authored-by: Your Name <you@example.com>
  • Loading branch information
AlexZorkin and Your Name committed Mar 20, 2024
1 parent f053b77 commit 800be3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/api/viewsets/ComplianceReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def list(self, request, *args, **kwargs):
return Response(data)

def compliance_to_new_act(self, obj, snapshot):
if int(obj.compliance_period.description) > 2022 and snapshot is not None:
if int(obj.compliance_period.description) > 2022 \
and snapshot is not None and obj.type.the_type != "Exclusion Report":
lines = snapshot.get('summary').get('lines')
if lines.get('29A') is None:
previous_transactions = []
Expand Down

0 comments on commit 800be3f

Please sign in to comment.