diff --git a/modelbaker/db_factory/pg_command_config_manager.py b/modelbaker/db_factory/pg_command_config_manager.py index 3c08065..c882af6 100644 --- a/modelbaker/db_factory/pg_command_config_manager.py +++ b/modelbaker/db_factory/pg_command_config_manager.py @@ -100,7 +100,10 @@ def get_uri( uri += ["password={}".format(authconfig_map.get("password"))] else: if not service_config or not service_config.get("user", None): - uri += ["user={}".format(self.configuration.dbusr or fallback_user)] + if self.configuration.dbusr: + uri += ["user={}".format(self.configuration.dbusr)] + elif fallback_user: + uri += ["user={}".format(fallback_user)] if not service_config or not service_config.get("password", None): if self.configuration.dbpwd: uri += ["password={}".format(self.configuration.dbpwd)]