Skip to content

Commit

Permalink
Merge pull request #443 from dimagi/sr/pustartdate
Browse files Browse the repository at this point in the history
Check for None value
  • Loading branch information
sravfeyn authored Dec 4, 2024
2 parents 4acf63d + 41f5c25 commit 41b7557
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commcare_connect/form_receiver/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def process_deliver_unit(user, xform: XForm, app: CommCareApp, opportunity: Oppo
)
completed_work_needs_save = False
today = datetime.date.today()
if opportunity.start_date > today or (payment_unit.start_date and payment_unit.start_date > today):
paymentunit_startdate = payment_unit.start_date if payment_unit else None
if opportunity.start_date > today or (paymentunit_startdate and paymentunit_startdate > today):
completed_work = None
user_visit.status = VisitValidationStatus.trial
else:
Expand Down

0 comments on commit 41b7557

Please sign in to comment.