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
commitf4bad8942ed753b85fcf7bdb00ce666bebe53c97 (patch)
tree5e230e6e9a775029ee560a92a4678064ae1a3ec4 /ishtar_common/models.py
parentaf1ea36dabb2cd1e165e54020286ff723c109f37 (diff)
downloadIshtar-f4bad8942ed753b85fcf7bdb00ce666bebe53c97.tar.bz2
Ishtar-f4bad8942ed753b85fcf7bdb00ce666bebe53c97.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: