Skip to content

Commit

Permalink
Bug fix from Canary testing
Browse files Browse the repository at this point in the history
  • Loading branch information
BradHN1 committed Oct 19, 2023
1 parent a093afc commit ebbf907
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/carbon_calculator/CCDefaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def getDefault(self, locality, variable, date, default=None):
value = var["values"][-1]
else:
for i in range(len(var["valid_dates"])):
valid_date = var["valid_dates"][i]
valid_date = datetime.strptime(var["valid_dates"][i], '%Y-%m-%d').date()
print(locality,variable,valid_date,type(valid_date))
if valid_date < date:
value = var["values"][i]
return value
Expand Down
2 changes: 1 addition & 1 deletion src/task_queue/database_tasks/update_actions_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def update_actions_content(task=None):
if len(data) > 0:
report = write_to_csv(data)
temp_data = {'data_type': "Content Spacing", "name":task.creator.full_name if task.creator else "admin"}
file_name = "Content-Spacing-Report-{}.csv".format(datetime.datetime.now().strftime("%Y-%m-%d"))
file_name = "Update-Actions-Report-{}.csv".format(datetime.datetime.now().strftime("%Y-%m-%d"))
send_massenergize_email_with_attachments(DATA_DOWNLOAD_TEMPLATE,temp_data,[task.creator.email], report, file_name)

return True
Expand Down

0 comments on commit ebbf907

Please sign in to comment.