Skip to content

Commit

Permalink
Use group -1 in manage_action_containers()
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Apr 29, 2016
1 parent fc7aa3f commit 61a7965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def _get_object(self):
return self.tag
if self.file is not None:
return self.file
if self.comment is not None:
return self.comment

def obj_id(self):
obj = self._get_object()
Expand Down
5 changes: 5 additions & 0 deletions components/tools/OmeroWeb/omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,12 @@ def manage_action_containers(request, action, o_type=None, o_id=None,
if o_type is not None and o_id > 0:
kw[str(o_type)] = long(o_id)
try:
conn.SERVICE_OPTS.setOmeroGroup('-1')
manager = BaseContainer(conn, **kw)
obj = manager._get_object()
if obj is not None:
gid = obj.getDetails().group.id.val
conn.SERVICE_OPTS.setOmeroGroup(gid)
except AttributeError, x:
return handlerInternalError(request, x)
elif o_type in ("share", "sharecomment", "chat"):
Expand Down

0 comments on commit 61a7965

Please sign in to comment.