summaryrefslogtreecommitdiff
path: root/archaeological_warehouse
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-05-18 16:24:26 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:20:59 +0100
commitc641fca2bc2bd5c6892b4105325dee99e9da35d6 (patch)
tree5f9012ed94ce2f854d9a349f7264447419cd99d3 /archaeological_warehouse
parente39f05ef095d9b74853fa177d8ce2a566478dae2 (diff)
downloadIshtar-c641fca2bc2bd5c6892b4105325dee99e9da35d6.tar.bz2
Ishtar-c641fca2bc2bd5c6892b4105325dee99e9da35d6.zip
Syndication - serialization - display sheet find - 2
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r--archaeological_warehouse/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index 2ea825406..8494b5bdc 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -1016,6 +1016,10 @@ class Container(
QUICK_ACTIONS = [QA_EDIT, QA_LOCK]
BASE_QUERY_LOCATION = "container_tree_child__container_parent"
+ SERIALIZE_CALL = {
+ "localisation_list": "localisation_list",
+ }
+ SERIALIZE_PROPERTIES = MainItem.SERIALIZE_PROPERTIES + ["short_label"]
objects = UUIDModelManager()
@@ -1430,6 +1434,9 @@ class Container(
localisations.append(self.location)
return reversed(localisations)
+ def localisation_list(self):
+ return [l.short_label for l in self.get_localisations()]
+
def get_localisation(self, place):
locas = list(self.get_localisations())
if len(locas) < (place + 1):