Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Another fix try
  • Loading branch information
Ailurupoda committed Feb 7, 2019
1 parent f27ecab commit 832eb40
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/postgis/connector.py
Expand Up @@ -743,7 +743,7 @@ def renameTable(self, table, new_table):
self._commit()

def commentTable(self, schema, tablename, comment=None, db):
if comment = None:
if comment == None:
db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS NULL;'.format(schema, tablename))
else:
db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS E\'{2}\';'.format(schema, tablename, comment))
Expand Down
Expand Up @@ -582,7 +582,6 @@ def getComment(self, tablename, field, db):
def addTableColumn(self, table, field_def):
""" add a column to table """
sql = u"ALTER TABLE %s ADD %s" % (self.quoteId(table), field_def)
self._execute_and_commit(sql)
self._execute(None, sql)

sql = u"SELECT InvalidateLayerStatistics(%s)" % (self.quoteId(table))
Expand Down

0 comments on commit 832eb40

Please sign in to comment.