Skip to content
Permalink
Browse files

Ensure "dbname" is set in the uri, once again

Fixes #16625 (ref #10600)
  • Loading branch information
strk committed May 26, 2017
1 parent c05d779 commit 13e39da074305a1451b9fd57ce4aedaa8be54121
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 13e39da

Please sign in to comment.
You can’t perform that action at this time.