Skip to content
Permalink
Browse files
[dbmanager] Fix settings default and Python type for connection with …
…postgis plugin

- Saved connections with empty password raised a QPyNullVariant parameter error due to lack of str default
  • Loading branch information
dakcarto committed Aug 3, 2013
1 parent a773be2 commit e1927522a43ac102897fd6dcc629578f1d8c2b40
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/db_manager/db_plugins/postgis/plugin.py
@@ -77,7 +77,7 @@ def connect(self, parent=None):
uri = QgsDataSourceURI()

settingsList = ["service", "host", "port", "database", "username", "password"]
service, host, port, database, username, password = map(lambda x: settings.value(x), settingsList)
service, host, port, database, username, password = map(lambda x: settings.value(x, "", type=str), settingsList)

# qgis1.5 use 'savePassword' instead of 'save' setting
savedPassword = settings.value("save", False, type=bool) or settings.value("savePassword", False, type=bool)

0 comments on commit e192752

Please sign in to comment.