diff options
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 |
commit | 76311ba9b141191a39166a2fb925c7452f31be38 (patch) | |
tree | 87e2fa2dee181df10b10441d19b97b8b934c727f /archaeological_operations | |
parent | fe39cb336acbb04da6934dd4d5dfe4f4f2d66754 (diff) | |
download | Ishtar-76311ba9b141191a39166a2fb925c7452f31be38.tar.bz2 Ishtar-76311ba9b141191a39166a2fb925c7452f31be38.zip |
Document templates: manage finds, base finds, baskets relations
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/models.py | 9 |
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): |