mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Ensure "dbname" is set in the uri, once again
Fixes #16625 (ref #10600)
This commit is contained in:
parent
c05d779ccd
commit
13e39da074
@ -56,7 +56,7 @@ class PostGisDBConnector(DBConnector):
|
|||||||
password = uri.password() or os.environ.get('PGPASSWORD')
|
password = uri.password() or os.environ.get('PGPASSWORD')
|
||||||
|
|
||||||
# Do not get db and user names from the env if service is used
|
# 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:
|
if username is None:
|
||||||
username = os.environ.get('USER')
|
username = os.environ.get('USER')
|
||||||
self.dbname = uri.database() or os.environ.get('PGDATABASE') or username
|
self.dbname = uri.database() or os.environ.get('PGDATABASE') or username
|
||||||
|
Loading…
x
Reference in New Issue
Block a user