summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index e05bcad2d..6a758e72a 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -4064,7 +4064,7 @@ post_save.connect(post_save_cache, sender=DocumentTag)
post_delete.connect(post_save_cache, sender=DocumentTag)
-class ShootingAngle(OrderedType):
+class ShootingAngle(OrderedHierarchicalType):
class Meta:
verbose_name = _("Shooting angle")
verbose_name_plural = _("Shooting angles")
@@ -4183,6 +4183,7 @@ class Document(
SearchVectorConfig("files__cached_label"),
SearchVectorConfig("towns__name"),
SearchVectorConfig("areas__label"),
+ SearchVectorConfig("shooting_angle__label"),
]
PARENT_SEARCH_VECTORS = [
"authors",
@@ -4399,6 +4400,10 @@ class Document(
pgettext_lazy("key for text search", "creation-date-after"),
"creation_date__gte",
),
+ "shooting_angle": SearchAltName(
+ pgettext_lazy("key for text search", "shooting-angle"),
+ "shooting_angle__label__iexact",
+ ),
}
ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES)