Skip to content

Commit 1229ab7

Browse files
committed
Issue2550934 - templating.py-indexargs_form() returns id's as space separated list not comma separated
Compare filter=id&id=1+2+3+4+5+6+7 (+ means space) to filter=id&id=1,2,3,4,5,6,7 the latter seems to be a valid filter and the index page search will return items with those 7 id's. The former does not return the expected 7 items. Check to see if the name of the field is id. If it is don't treat it as a string which pastes all the values together with spaces.
1 parent 8d86d02 commit 1229ab7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roundup/cgi/templating.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2763,7 +2763,10 @@ def add(k, v):
27632763
if k in exclude:
27642764
continue
27652765
if type(v) == type([]):
2766-
if isinstance(cls.get_transitive_prop(k), hyperdb.String):
2766+
# id's are stored as strings but should be treated
2767+
# as integers in lists.
2768+
if (isinstance(cls.get_transitive_prop(k), hyperdb.String)
2769+
and k != 'id'):
27672770
add(k, ' '.join(v))
27682771
else:
27692772
add(k, ','.join(v))

0 commit comments

Comments
 (0)