summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-05-22 11:07:10 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-05-22 11:07:10 +0200
commit9f577da421b5b909fea2caff3049aea1cd7acf30 (patch)
tree87e2fa2dee181df10b10441d19b97b8b934c727f /archaeological_operations
parent7eba12011665ebb62c15a7b54c45237dc4f71e86 (diff)
downloadIshtar-9f577da421b5b909fea2caff3049aea1cd7acf30.tar.bz2
Ishtar-9f577da421b5b909fea2caff3049aea1cd7acf30.zip
Document templates: manage finds, base finds, baskets relations
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/models.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 860422980..6ae219461 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -975,7 +975,14 @@ class Operation(ClosedItem, BaseHistorizedItem, QRCodeItem, GeoItem, OwnPerms,\
def get_values(self, prefix=''):
values = super(Operation, self).get_values(prefix=prefix)
- return get_values_town_related(self, prefix, values)
+ values = get_values_town_related(self, prefix, values)
+ if prefix:
+ return values
+ values[prefix + 'context_records'] = [
+ cr.get_values(prefix=prefix, no_base_finds=False)
+ for cr in self.context_record.all()
+ ]
+ return values
@classmethod
def _get_department_code(cls, value):