summaryrefslogtreecommitdiff
path: root/ishtar_common
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
commitb86869c2361c34563981dc0ca8cf1759c5465893 (patch)
tree98bf8db6f0a5a244dff4587082114d777ba8d304 /ishtar_common
parent8e1c09dc8c0e115c6e7899b44f3fa50dd3fa59b2 (diff)
downloadIshtar-b86869c2361c34563981dc0ca8cf1759c5465893.tar.bz2
Ishtar-b86869c2361c34563981dc0ca8cf1759c5465893.zip
Update doc
Diffstat (limited to 'ishtar_common')
-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