Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 4959:177b77302262
Another fix for 'try_id_parsing'
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Mon, 29 Dec 2014 16:58:27 +0100 |
| parents | 9b1302f9fb11 |
| children | bb97f61e1b73 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Tue Dec 16 13:44:12 2014 +0100 +++ b/roundup/cgi/templating.py Mon Dec 29 16:58:27 2014 +0100 @@ -1983,8 +1983,13 @@ else: k = linkcl.getkey() idparse = self._prop.try_id_parsing - if k and idparse and num_re.match(self._value): - value = linkcl.get(self._value, k) + if k and num_re.match(self._value): + try : + value = linkcl.get(self._value, k) + except IndexError : + if idparse : + raise + value = '' else: value = self._value return self.input(name=self._formname, value=value, size=size,
