summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-21 20:28:02 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-21 20:28:02 +0100
commit8661870960701ba1ac7b52a867ed14d10acacf93 (patch)
tree5e230e6e9a775029ee560a92a4678064ae1a3ec4 /ishtar_common/models.py
parent9aa59d8ea96e19d472227ff6eefdefc929523700 (diff)
downloadIshtar-8661870960701ba1ac7b52a867ed14d10acacf93.tar.bz2
Ishtar-8661870960701ba1ac7b52a867ed14d10acacf93.zip
Administrativ act: adapt forms, models and sheet
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index eb84f8a7e..3af92a39e 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -1030,6 +1030,10 @@ class FullSearch(models.Model):
:param save: True if you want to save the object immediately
:return: True if modified
"""
+ if not self.pk:
+ logger.warning("Cannot update search vector before save or "
+ "after deletion.")
+ return
if not self.BASE_SEARCH_VECTORS and not self.M2M_SEARCH_VECTORS \
and not self.INT_SEARCH_VECTORS \
and not self.PARENT_SEARCH_VECTORS: