diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 4 |
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: |