Skip to content

Commit

Permalink
Add in condition for None
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 committed Nov 25, 2024
1 parent 77b0c77 commit de2026e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jobs/payment-jobs/tasks/ap_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
RoutingSlipStatus,
)
from sentry_sdk import capture_message
from sqlalchemy import Date, cast
from sqlalchemy import Date, cast, or_

from tasks.common.cgi_ap import CgiAP
from tasks.common.dataclasses import APLine
Expand Down Expand Up @@ -109,7 +109,8 @@ def _create_eft_refund_file(cls):
eft_refunds_dao = (
db.session.query(EFTRefundModel)
.filter(EFTRefundModel.status == EFTShortnameRefundStatus.APPROVED.value)
.filter(EFTRefundModel.disbursement_status_code != DisbursementStatus.UPLOADED.value)
.filter(or_(EFTRefundModel.disbursement_status_code != DisbursementStatus.UPLOADED.value,
EFTRefundModel.disbursement_status_code.is_(None)))
.filter(EFTRefundModel.refund_amount > 0)
.all()
)
Expand Down

0 comments on commit de2026e

Please sign in to comment.