From 03b48aecbc234eabbc6cc1192f82b6a9daa9a13f Mon Sep 17 00:00:00 2001 From: Elmir Jagudin Date: Wed, 16 Oct 2024 16:34:42 +0200 Subject: [PATCH] ISPyB client: handle boolean loginTranslate property correctly When using YAML config file for ISPyBClient hardware object, it feels logical to use YAML boolean type for 'loginTranslate' property. For example a following config file: class: ISPyBClient.ISPyBClient configuration: authServerType: ispyb loginTranslate: false This change fixes a bug where 'self.loginTranslate' would be assigned True value for the config file above. --- mxcubecore/HardwareObjects/ISPyBClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxcubecore/HardwareObjects/ISPyBClient.py b/mxcubecore/HardwareObjects/ISPyBClient.py index c05768266e..fd64d04cf4 100644 --- a/mxcubecore/HardwareObjects/ISPyBClient.py +++ b/mxcubecore/HardwareObjects/ISPyBClient.py @@ -199,7 +199,7 @@ def init(self): if self.ldapConnection is None: logging.getLogger("HWR").debug("LDAP Server is not available") - self.loginTranslate = self.get_property("loginTranslate") or True + self.loginTranslate = self.get_property("loginTranslate", True) self.beamline_name = HWR.beamline.session.beamline_name self.ws_root = self.get_property("ws_root")