Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 5051:b69c5e763295
issue2550748: Crash when creating new issues with non-existing multilink values (in classic template). Applied patch provided by user. (John Rouillard)
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 09 Apr 2016 01:15:22 -0400 |
| parents | ac0c117cd24c |
| children | d7a4eeb7f843 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Sat Apr 09 00:33:10 2016 -0400 +++ b/roundup/cgi/templating.py Sat Apr 09 01:15:22 2016 -0400 @@ -363,7 +363,11 @@ l = [] for entry in ids: if num_re.match(entry): - label = linkcl.get(entry, key) + try: + label = linkcl.get(entry, key) + except IndexError: + # fall back to id if illegal (avoid template crash) + label = entry # fall back to designator if label is None if label is None: label = '%s%s'%(linkcl.classname, entry) l.append(label)
