comparison roundup/cgi/actions.py @ 4992:b562df8a5056

Fix form-parsing for multilinks If multiple new items are added to a multilink property, the old version would create the new items but only link one.
author Ralf Schlatterbeck <rsc@runtux.com>
date Sun, 21 Jun 2015 21:20:10 +0200
parents ca692423e401
children 494d255043c9
comparison
equal deleted inserted replaced
4991:03505579abef 4992:b562df8a5056
488 existing = cl.get(linkid, linkprop)[:] 488 existing = cl.get(linkid, linkprop)[:]
489 existing.append(nodeid) 489 existing.append(nodeid)
490 props[linkprop] = existing 490 props[linkprop] = existing
491 else: 491 else:
492 props[linkprop] = nodeid 492 props[linkprop] = nodeid
493 elif isinstance(propdef, hyperdb.Multilink):
494 props[linkprop].append(nodeid)
493 495
494 return '\n'.join(m) 496 return '\n'.join(m)
495 497
496 def _changenode(self, cn, nodeid, props): 498 def _changenode(self, cn, nodeid, props):
497 """Change the node based on the contents of the form.""" 499 """Change the node based on the contents of the form."""

Roundup Issue Tracker: http://roundup-tracker.org/