Skip to content

Commit 78bfa46

Browse files
committed
bug: fix case where null json value for datetime fails
Json like: { "assignedto": "3", "duedate": null, "files": [], "keyword": [], "messages": [ "4", "13" ], "nosy": [], "priority": "2", "status": "3", "superseder": [], "title": "issue title" } is produced by a GET request using verbose=0. When submitted to the rest interface results in: property duedate: 'None' is an invalid date (Not a date spec: 'None' ("yyyy-mm-dd", "mm-dd", "HH:MM", "HH:MM:SS" or "yyyy-mm-dd.HH:MM:SS.SSS" Fix FsValue to map null to the None object rather than 'None' string.
1 parent 4ec9098 commit 78bfa46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

roundup/rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,8 @@ def __init__(self, name, val):
27822782
elif isinstance(val, type([])):
27832783
# then lists of strings
27842784
self.value = [u2s(v) for v in val]
2785+
elif val is None:
2786+
self.value = None
27852787
else:
27862788
# then stringify anything else (int, float)
27872789
self.value = str(val)

0 commit comments

Comments
 (0)