diff --git a/src/charm.py b/src/charm.py index 9de4b63e5..d5953b427 100755 --- a/src/charm.py +++ b/src/charm.py @@ -604,7 +604,7 @@ def _on_set_password(self, event: ActionEvent) -> None: # rotate password to shards # TODO in the future support rotating passwords of pbm across shards - if username == OperatorUser.get_username() or username == BackupUser.get_username: + if username in [OperatorUser.get_username(), BackupUser.get_username()]: self.config_server.update_credentials( MongoDBUser.get_password_key_name_for_user(username), new_password,