summaryrefslogtreecommitdiff
path: root/archaeological_warehouse
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-24 19:14:37 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:25 +0100
commit16a47f887447ecccd56fc848aee95fa56af92548 (patch)
treef96e518b2766d2a300829d0e5f9fac491d6d065d /archaeological_warehouse
parent0eab67538b8f2af9283bf1e77438763914e355b7 (diff)
downloadIshtar-16a47f887447ecccd56fc848aee95fa56af92548.tar.bz2
Ishtar-16a47f887447ecccd56fc848aee95fa56af92548.zip
get_values: get containers from operation - material_types_code from finds
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r--archaeological_warehouse/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index d049b8093..16bbaab40 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -1438,7 +1438,7 @@ class Container(DocumentItem, Merge, LightHistorizedItem,
def get_material_types_code(self) -> str:
"""
- Return dash separated material type code inside a container
+ Return pipe separated material type code inside a container
"""
materials = set()
for material in self.finds.exclude(
@@ -1463,7 +1463,8 @@ class Container(DocumentItem, Merge, LightHistorizedItem,
prefix=prefix, no_values=no_values, filtr=filtr, **kwargs)
from_find = prefix.startswith("container_") or \
prefix.startswith("container_ref_")
- if (not filtr or prefix + 'finds' in filtr) and not from_find:
+ if (not filtr or prefix + 'finds' in filtr) and not from_find and \
+ "finds" not in kwargs.get("exclude", []):
kwargs["exclude"] = [prefix + "container", prefix + "container_ref"]
# prevent recursive call
values[prefix + 'finds'] = [