From d3bb75972867b4ba9bcbee1e22d5539f6056f055 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 21 Jun 2021 17:51:16 +0200 Subject: Update doc --- ishtar_common/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models.py') 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 -- cgit v1.2.3