Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 1631:8a908bbad1ef
A couple of form value handling changes:
- multilink properties may hhave multiple form values "1", "2,4", "5", ...
- string search properties are split on whitespace and match any of the
values
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 09 May 2003 01:47:51 +0000 |
| parents | 21312a7564fd |
| children | ac5f7e5a11e5 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Thu May 08 07:07:42 2003 +0000 +++ b/roundup/cgi/templating.py Fri May 09 01:47:51 2003 +0000 @@ -1457,13 +1457,17 @@ if self.classname is not None: props = db.getclass(self.classname).getprops() for name in self.filter: - if self.form.has_key(name): - prop = props[name] - fv = self.form[name] - if (isinstance(prop, hyperdb.Link) or - isinstance(prop, hyperdb.Multilink)): - self.filterspec[name] = lookupIds(db, prop, - handleListCGIValue(fv)) + if not self.form.has_key(name): + continue + prop = props[name] + fv = self.form[name] + if (isinstance(prop, hyperdb.Link) or + isinstance(prop, hyperdb.Multilink)): + self.filterspec[name] = lookupIds(db, prop, + handleListCGIValue(fv)) + else: + if isinstance(fv, type([])): + self.filterspec[name] = [v.value for v in fv] else: self.filterspec[name] = fv.value
