X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/blobdiff_plain/fc9e46f8f27aaceecd2825cd90409451c3974159..572f5798d7d6d3e73cffe0bfabd6e85542fde43f:/skins/lrservice.py?ds=sidebyside diff --git a/skins/lrservice.py b/skins/lrservice.py index fdebcad..8b56499 100644 --- a/skins/lrservice.py +++ b/skins/lrservice.py @@ -46,8 +46,8 @@ elif method == 'uploadPhoto' : 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()])