diff --git a/python/plugins/db_manager/db_plugins/postgis/connector.py b/python/plugins/db_manager/db_plugins/postgis/connector.py index a6f267a16c35..a195bff6e11a 100644 --- a/python/plugins/db_manager/db_plugins/postgis/connector.py +++ b/python/plugins/db_manager/db_plugins/postgis/connector.py @@ -56,7 +56,7 @@ def __init__(self, uri): password = uri.password() or os.environ.get('PGPASSWORD') # Do not get db and user names from the env if service is used - if uri.service() is None: + if not uri.service(): if username is None: username = os.environ.get('USER') self.dbname = uri.database() or os.environ.get('PGDATABASE') or username