mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2026-11-09 16:40:07 +00:00
Use ISO 8601 as the default datetime format
This commit is contained in:
1 parent
8c871d83d0
commit
281e568edf
4 files changed
+16
-16
No files matched your search
@@ -96,9 +96,9 @@ def ressource_after_update_handler(mapper, connection, ressource):
|
||||
if not history.has_changes():
|
||||
continue
|
||||
new_value = history.added[0]
|
||||
# DateTime attributes must be converted to a timestamp
|
||||
# DateTime attributes must be converted to a string
|
||||
if isinstance(new_value, datetime):
|
||||
new_value = new_value.timestamp()
|
||||
new_value = new_value.isoformat()
|
||||
jsonpatch.append(
|
||||
{
|
||||
'op': 'replace',
|
||||
|
||||
Reference in new issue
Block a user