Skip to content

Commit d639171

Browse files
committed
Fix lookup of negative ids
.. e.g., for searching empty Link/Multilink values.
1 parent 11cad1b commit d639171

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/rest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,9 @@ def get_collection(self, class_name, input):
732732
else:
733733
vals = []
734734
for p in value.split(","):
735-
if prop.try_id_parsing and p.isdigit():
735+
dig = p and p.isdigit() or \
736+
(p[0] in ('-','+') and p[1:].isdigit())
737+
if prop.try_id_parsing and dig:
736738
vals.append(p)
737739
else:
738740
vals.append(linkcls.lookup(p))

0 commit comments

Comments
 (0)