mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-06 08:08:25 -04:00
Update template json to return created_at and updated_at. Also fixed a bug where updated_at was not being added to the templates_history model.
This commit is contained in:
@@ -208,6 +208,9 @@ def create_history(obj):
|
||||
obj.created_at = datetime.datetime.utcnow()
|
||||
else:
|
||||
obj.version += 1
|
||||
now = datetime.datetime.utcnow()
|
||||
obj.updated_at = now
|
||||
data['updated_at'] = now
|
||||
|
||||
data['version'] = obj.version
|
||||
data['created_at'] = obj.created_at
|
||||
|
||||
Reference in New Issue
Block a user