Skip to content

Commit 17ddd0c

Browse files
committed
issue2551078 - Fix traceback caused when putting two id's into a Link html field.
A ValueError is raised. Handle exception and return invalid value. hyperdb.py now reports 'you may only enter ID values for property ...' to the user.
1 parent 39ccdff commit 17ddd0c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ Fixed:
9595
- issue2551062: roundup-admin security now exits status 1 when
9696
it finds an invalid property. It no longer tries to print the rest
9797
of the security properties. (John Rouillard)
98+
- issue2551078 - Fix traceback caused when putting two id's into a
99+
Link html field. A ValueError is raised. Handle exception and return
100+
value. hyperdb.py now reports 'you may only enter ID values for
101+
property ...' to the user.
98102

99103
Features:
100104
- issue2550522 - Add 'filter' command to command-line

roundup/cgi/templating.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,8 +1058,11 @@ def __getitem__(self, item):
10581058

10591059
# get the value, handling missing values
10601060
value = None
1061-
if int(self._nodeid) > 0:
1062-
value = self._klass.get(self._nodeid, items[0], None)
1061+
try:
1062+
if int(self._nodeid) > 0:
1063+
value = self._klass.get(self._nodeid, items[0], None)
1064+
except ValueError:
1065+
value = self._nodeid
10631066
if value is None:
10641067
if isinstance(prop, hyperdb.Multilink):
10651068
value = []

0 commit comments

Comments
 (0)