uid = uidtool.register(photo)
return '%s %s' % (uid, photo.absolute_url())
-elif method == 'deletePhoto' :
- photo = uidtool.queryObject(fg('uid'))
- if photo :
- parent = photo.getParentNode()
- parent.manage_delObjects([photo.getId()])
+elif method in ('deletePhoto', 'deletePortfolio') :
+ o = uidtool.queryObject(fg('uid'))
+ if o :
+ parent = o.getParentNode()
+ parent.manage_delObjects([o.getId()])