Mercurial > p > roundup > code
diff roundup/cgi/actions.py @ 4293:9b9ab6109254
Generic class editor may now restore retired items (thanks Ralf Hemmecke)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 02 Dec 2009 23:49:57 +0000 |
| parents | 42331c201b02 |
| children | df7a4400c2ce |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Tue Dec 01 09:09:11 2009 +0000 +++ b/roundup/cgi/actions.py Wed Dec 02 23:49:57 2009 +0000 @@ -320,6 +320,11 @@ 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
