Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DBManager oracle plugin: strip '"' on unique col
For Oracle provider, giving a quoted uniqueColumn in a uri to create a
QgsVectorLayer results in an invalid layer.

To fix it, strip '"' is applied to unique col.
  • Loading branch information
rldhont committed Jan 14, 2016
1 parent 91b0e7f commit f5373ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -203,7 +203,7 @@ def toSqlLayer(self, sql, geomCol, uniqueCol,
uri = self.uri()
con = self.database().connector

uri.setDataSource(u"", u"({})".format(sql), geomCol, filter, uniqueCol)
uri.setDataSource(u"", u"({})".format(sql), geomCol, filter, uniqueCol.strip(u'"'))
if avoidSelectById:
uri.disableSelectAtId(True)
provider = self.dbplugin().providerName()
Expand Down

0 comments on commit f5373ac

Please sign in to comment.