From dbf00ab782ffa5386151a8d4b47d5a4da9c02eb0 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 1 Mar 2024 21:40:27 +0000 Subject: [PATCH] set session from client --- src/omero/gateway/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/omero/gateway/__init__.py b/src/omero/gateway/__init__.py index 3b6850f28..da42cb4b2 100644 --- a/src/omero/gateway/__init__.py +++ b/src/omero/gateway/__init__.py @@ -1537,6 +1537,12 @@ def __init__(self, username=None, passwd=None, client_obj=None, group=None, self._sessionUuid = None self._session_cb = None self._session = None + if self.c is not None: + try: + self._sessionUuid = self.c.getSessionId() + self._session = self.c.getSession() + except omero.ClientError: # no session available + pass self._lastGroupId = None self._anonymous = anonymous self._defaultOmeroGroup = None