summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-06-21 17:51:16 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-06-21 17:51:16 +0200
commitd3bb75972867b4ba9bcbee1e22d5539f6056f055 (patch)
tree98bf8db6f0a5a244dff4587082114d777ba8d304 /ishtar_common/models.py
parent017da0cd9ae38b76377f959f05f5913bb8b296f4 (diff)
downloadIshtar-d3bb75972867b4ba9bcbee1e22d5539f6056f055.tar.bz2
Ishtar-d3bb75972867b4ba9bcbee1e22d5539f6056f055.zip
Update doc
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 54d809fdd..e0b22a4f0 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -911,8 +911,8 @@ class RelationsViews(models.Model):
if table_type == 'VIEW':
return
elif 'TABLE' in table_type:
- q = "DROP TABLE %s"
- cursor.execute(q, [cls._meta.db_table])
+ q = "DROP TABLE IF EXISTS %s" % cls._meta.db_table
+ cursor.execute(q)
cursor.execute(cls.CREATE_SQL)
return True