Skip to content

Commit

Permalink
πŸ› Fix crash in jzwb export if receipt-date is none
Browse files Browse the repository at this point in the history
  • Loading branch information
pajowu committed Apr 18, 2024
1 parent 04783a0 commit 028ca98
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fragdenstaat_de/fds_donation/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,11 @@ def get_donation_data(donations, ignore_receipt_date: Optional[datetime] = None)
{
"date": format_date(donation.received_timestamp),
"formatted_amount": format_number(donation.amount),
"receipt_date": donation.receipt_date < ignore_receipt_date
if ignore_receipt_date is not None
else bool(donation.receipt_date),
"receipt_date": (
donation.receipt_date < ignore_receipt_date
if ignore_receipt_date and donation.receipt_date
else bool(donation.receipt_date)
),
"amount": donation.amount,
}
for donation in donations
Expand Down

0 comments on commit 028ca98

Please sign in to comment.