Mercurial > p > roundup > code
changeset 8530:36be91f671d0
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.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 07 Mar 2026 19:25:22 -0500 |
| parents | a371ef0059d0 |
| children | 4fe0d14cf915 |
| files | roundup/rest.py |
| diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/rest.py Sun Mar 01 21:39:44 2026 -0500 +++ b/roundup/rest.py Sat Mar 07 19:25:22 2026 -0500 @@ -2782,6 +2782,8 @@ elif isinstance(val, type([])): # then lists of strings self.value = [u2s(v) for v in val] + elif val is None: + self.value = None else: # then stringify anything else (int, float) self.value = str(val)
