Skip to content

Commit

Permalink
Date Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanpa-aot committed Oct 16, 2023
1 parent cf68feb commit 555ffb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion met-api/src/met_api/schemas/engagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ def get_submission_status(self, obj):
# Strip time off datetime object
date_due = datetime(now.year, now.month, now.day)

print('--date_due-:',date_due)
print('-start_date -:', obj.start_date )
print('--end_date -:', obj.end_date)
if obj.start_date <= date_due <= obj.end_date:
return SubmissionStatus.Open.value

if datetime.now() <= obj.start_date:
if date_due <= obj.start_date:
return SubmissionStatus.Upcoming.value

return SubmissionStatus.Closed.value
Expand Down

0 comments on commit 555ffb0

Please sign in to comment.