diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index d8cc862f6..a70399ba7 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -4781,9 +4781,16 @@ class Document(BaseHistorizedItem, OwnPerms, ImageModel, ValueGetter, MainItem): pgettext_lazy("key for text search", "warehouse"), 'warehouses__name__iexact' ), + 'image__isnull': + SearchAltName( + pgettext_lazy("key for text search", "has-image"), + 'image__isnull'), } ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES) + # search parameters + REVERSED_BOOL_FIELDS = ['image__isnull'] + objects = ExternalIdManager() RELATIVE_SESSION_NAMES = [ ('find', 'finds__pk'), |