summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_treatments.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-10 11:29:02 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-10 11:29:02 +0100
commitc108937967d18c1b22aa5b2d87e093fe0ec83117 (patch)
treead2a67c9c118abb0ed734394bc1945974e74477c /archaeological_finds/models_treatments.py
parent960d580bcbe19293941926639ac1750c391e8a07 (diff)
downloadIshtar-c108937967d18c1b22aa5b2d87e093fe0ec83117.tar.bz2
Ishtar-c108937967d18c1b22aa5b2d87e093fe0ec83117.zip
Document generation: WIP on basket
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r--archaeological_finds/models_treatments.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 080d2cc50..3d3827596 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -853,6 +853,15 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem,
for attr in ('year', 'index', 'internal_reference',
'name') if getattr(self, attr)])
+ def get_values(self, prefix=''):
+ values = super(TreatmentFile, self).get_values(prefix=prefix)
+ if not self.associated_basket:
+ return
+ values[prefix + "basket"] = [
+ find.get_values() for find in self.associated_basket.items.all()
+ ]
+ return values
+
def get_extra_actions(self, request):
# url, base_text, icon, extra_text, extra css class, is a quick action
actions = []