Skip to content

Commit

Permalink
[Bugfix] DB Mananger: Fix in Oracle plugin the way to strip uniqueCol
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Jul 15, 2019
1 parent 4b7acc2 commit 779cc67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -202,7 +202,12 @@ def toSqlLayer(self, sql, geomCol, uniqueCol,
uri = self.uri()
con = self.database().connector

uri.setDataSource(u"", u"({}\n)".format(sql), geomCol, filter, uniqueCol.strip(u'"'))
if uniqueCol is not None:
uniqueCol = uniqueCol.strip('"').replace('""', '"')

uri.setDataSource(u"", u"({}\n)".format(
sql), geomCol, filter, uniqueCol)

if avoidSelectById:
uri.disableSelectAtId(True)
provider = self.dbplugin().providerName()
Expand Down

0 comments on commit 779cc67

Please sign in to comment.