Mercurial > p > roundup > code
diff roundup/rest.py @ 5904:2b78e21d7047
Fix lookup of negative ids
.. e.g., for searching empty Link/Multilink values.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Tue, 08 Oct 2019 12:35:12 +0200 |
| parents | 6630baff5f68 |
| children | 3ca3bfe6de16 |
line wrap: on
line diff
--- a/roundup/rest.py Mon Oct 07 16:30:47 2019 -0400 +++ b/roundup/rest.py Tue Oct 08 12:35:12 2019 +0200 @@ -732,7 +732,9 @@ else: vals = [] for p in value.split(","): - if prop.try_id_parsing and p.isdigit(): + dig = p and p.isdigit() or \ + (p[0] in ('-','+') and p[1:].isdigit()) + if prop.try_id_parsing and dig: vals.append(p) else: vals.append(linkcls.lookup(p))
