X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Fcgi%2Factions.py;h=c19849413aff73dc169ead6b0e6ba347f8996267;hb=871ccf70597f6a1b81c9f7d14917974cc78daa44;hp=eaf4c28a5b57080a455702ecefc997e1d94b3fad;hpb=1feef09b7ba74b66a66576e45fb014672e95453c;p=roundup.git diff --git a/roundup/cgi/actions.py b/roundup/cgi/actions.py index eaf4c28..c198494 100755 --- a/roundup/cgi/actions.py +++ b/roundup/cgi/actions.py @@ -320,6 +320,11 @@ class EditCSVAction(Action): raise exceptions.Unauthorised, self._( 'You do not have permission to create %(class)s' ) % {'class': self.classname} + elif cl.hasnode(itemid) and cl.is_retired(itemid): + # If a CSV line just mentions an id and the corresponding + # item is retired, then the item is restored. + cl.restore(itemid) + continue else: exists = 1 @@ -473,9 +478,9 @@ class EditCommon(Action): if linkid is None or linkid.startswith('-'): # linking to a new item if isinstance(propdef, hyperdb.Multilink): - props[linkprop] = [newid] + props[linkprop] = [nodeid] else: - props[linkprop] = newid + props[linkprop] = nodeid else: # linking to an existing item if isinstance(propdef, hyperdb.Multilink): @@ -483,7 +488,7 @@ class EditCommon(Action): existing.append(nodeid) props[linkprop] = existing else: - props[linkprop] = newid + props[linkprop] = nodeid return '
'.join(m)