diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 3404749c7..cd827a0d0 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1246,6 +1246,22 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, return return self.base_finds.order_by('-pk').all()[0] + def get_values(self, prefix=''): + values = super(Find, self).get_values(prefix=prefix) + return values + # TODO + bf = self.get_first_base_find() + if not bf: + return values + operation = bf.context_record.operation + values[prefix + "operation"] = [ + { + "common_name": operation.common_name, + "code_patriarche": operation.code_patriarche, + "address": operation.address + } + ] + @property def reference(self): bf = self.get_first_base_find() |