Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 5903:c3728772c594 | 5904:2b78e21d7047 |
|---|---|
| 730 if key in filter_props: | 730 if key in filter_props: |
| 731 vals = filter_props[key] | 731 vals = filter_props[key] |
| 732 else: | 732 else: |
| 733 vals = [] | 733 vals = [] |
| 734 for p in value.split(","): | 734 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: | |
| 736 vals.append(p) | 738 vals.append(p) |
| 737 else: | 739 else: |
| 738 vals.append(linkcls.lookup(p)) | 740 vals.append(linkcls.lookup(p)) |
| 739 filter_props[key] = vals | 741 filter_props[key] = vals |
| 740 else: | 742 else: |
