Skip to content

Commit

Permalink
[dbmanager] Fix settings default and Python type for connection with …
Browse files Browse the repository at this point in the history
…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 e192752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/postgis/plugin.py
Expand Up @@ -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)
Expand Down

0 comments on commit e192752

Please sign in to comment.