Skip to content

Commit 138ed7f

Browse files
committed
Fix issue2550822 (3e36a3bc0335 and 843886af0ea1) for multilinks, too
1 parent 1661c4e commit 138ed7f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

roundup/cgi/templating.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,12 +2281,13 @@ def menu(self, size=None, height=None, showid=0, additional=[],
22812281
if isinstance(prop, hyperdb.Link):
22822282
cl = self._db.getclass(prop.classname)
22832283
labelprop = cl.labelprop()
2284-
fn = lambda optionid: cl.get(linkcl.get(optionid,
2285-
propname),
2286-
labelprop)
2284+
fn = lambda optionid, \
2285+
propname=propname, labelprop=labelprop: \
2286+
cl.get(linkcl.get(optionid, propname), labelprop)
22872287
else:
2288-
fn = lambda optionid: linkcl.get(optionid, propname)
2289-
additional_fns.append(fn)
2288+
fn = lambda optionid, propname=propname: \
2289+
linkcl.get(optionid, propname)
2290+
additional_fns.append(fn)
22902291

22912292
for optionid in options:
22922293
# get the option value, and if it's None use an empty string

0 commit comments

Comments
 (0)