mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Convert the day_start from a string to a datetime.
This commit is contained in:
@@ -17,7 +17,9 @@ def create_nightly_billing(day_start=None):
|
||||
# 3 days of data counting back from day_start is consolidated
|
||||
if day_start is None:
|
||||
day_start = datetime.today() - timedelta(days=1)
|
||||
|
||||
else:
|
||||
# When calling the task its a string in the format of "YYYY-MM-DD"
|
||||
day_start = datetime.strptime(day_start, "%Y-%m-%d")
|
||||
for i in range(0, 3):
|
||||
process_day = day_start - timedelta(days=i)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user