Skip to content

Commit

Permalink
ISPyB client: handle boolean loginTranslate property correctly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elmjag committed Oct 28, 2024
1 parent b41d5eb commit 03b48ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mxcubecore/HardwareObjects/ISPyBClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 03b48ae

Please sign in to comment.