summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f7f1ea)
raw | patch | inline | side by side (parent: 6f7f1ea)
author | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 20 Feb 2009 04:07:04 +0000 (04:07 +0000) | ||
committer | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 20 Feb 2009 04:07:04 +0000 (04:07 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4150 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/templating.py | patch | blob | history |
index 772ad61af69365bba24eada56d4fba541c5bf297..b6fef8c6639f6ddc4ae86cd2545e65d94ca4d171 100644 (file)
linkcl = self._db.classes[self._prop.classname]
k = linkcl.labelprop(1)
if num_re.match(self._value):
- value = str(linkcl.get(self._value, k))
+ try:
+ value = str(linkcl.get(self._value, k))
+ except IndexError:
+ value = self._value
else :
value = self._value
if escape:
k = linkcl.labelprop(1)
labels = []
for v in self._value:
- label = linkcl.get(v, k)
- # fall back to designator if label is None
- if label is None: label = '%s%s'%(self._prop.classname, k)
+ if num_re.match(v):
+ try:
+ label = linkcl.get(v, k)
+ except IndexError:
+ label = None
+ # fall back to designator if label is None
+ if label is None: label = '%s%s'%(self._prop.classname, k)
+ else:
+ label = v
labels.append(label)
value = ', '.join(labels)
if escape: