mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Fix None type error in last-used endpoint.
This commit is contained in:
@@ -64,4 +64,4 @@ def get_last_used_datetime_for_template(service_id, template_id):
|
||||
last_date_used = dao_get_last_date_template_was_used(template_id=template_id,
|
||||
service_id=service_id)
|
||||
|
||||
return jsonify(last_date_used=last_date_used.strftime(DATETIME_FORMAT))
|
||||
return jsonify(last_date_used=last_date_used.strftime(DATETIME_FORMAT) if last_date_used else last_date_used)
|
||||
|
||||
Reference in New Issue
Block a user