From c9b07622ebf6f6dcceff3d6906d3ed33d74f24fd Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 11 Mar 2020 13:27:04 +0100 Subject: Searc criteria: add has image/file/url criteria for all document items --- archaeological_warehouse/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'archaeological_warehouse/models.py') diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 325adce9e..63d4497ac 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -603,9 +603,15 @@ class Container(DocumentItem, LightHistorizedItem, QRCodeItem, GeoItem, ), } + REVERSED_BOOL_FIELDS = [ + 'documents__image__isnull', + 'documents__associated_file__isnull', + 'documents__associated_url__isnull', + ] REVERSED_MANY_COUNTED_FIELDS = ['finds', 'finds_ref'] ALT_NAMES.update(LightHistorizedItem.ALT_NAMES) + ALT_NAMES.update(DocumentItem.ALT_NAMES) DYNAMIC_REQUESTS = { 'division': DynamicRequest( -- cgit v1.2.3