Skip to content
Permalink
Browse files

[dbmanager] Use user name as DB name if provided

Followup for 212b125
  • Loading branch information
Alessandro Pasotti
Alessandro Pasotti committed Apr 12, 2016
1 parent f227174 commit 1eb63768d927981e7b5f712c66a97bbbdeb80f13
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/db_manager/db_plugins/postgis/connector.py
@@ -53,10 +53,10 @@ def __init__(self, uri):

# Do not get db and user names from the env if service is used
if uri.service() is None:
self.dbname = uri.database() or os.environ.get('PGDATABASE') or username
uri.setDatabase(self.dbname)
if username is None:
username = os.environ.get('USER')
self.dbname = uri.database() or os.environ.get('PGDATABASE') or username
uri.setDatabase(self.dbname)

expandedConnInfo = self._connectionInfo()
try:

0 comments on commit 1eb6376

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