Skip to content

Commit

Permalink
[dbmanager] Fix error when connecting to postgis db
Browse files Browse the repository at this point in the history
Fixes #19240
  • Loading branch information
nyalldawson committed Jun 22, 2018
1 parent f0f50a1 commit 12efb86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/db_manager/db_plugins/postgis/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def connect(self, parent=None):
service, host, port, database, username, password, authcfg = [settings.value(x, "", type=str) for x in settingsList]

useEstimatedMetadata = settings.value("estimatedMetadata", False, type=bool)
sslmode = settings.value("sslmode", QgsDataSourceUri.SslPrefer, type=int)
try:
sslmode = settings.value("sslmode", QgsDataSourceUri.SslPrefer, type=int)
except TypeError:
sslmode = QgsDataSourceUri.SslPrefer

settings.endGroup()

Expand Down

0 comments on commit 12efb86

Please sign in to comment.