diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-11-30 10:31:59 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-11-30 10:31:59 +0100 |
commit | 987ce8f23e4affcffe750845d59576d9ccf88bc4 (patch) | |
tree | c0f368005bc0393d40514cd7eb06cbe46008a45a /archaeological_finds | |
parent | f72aeec98c54ad3c43d776d1070c621750a60940 (diff) | |
download | Ishtar-987ce8f23e4affcffe750845d59576d9ccf88bc4.tar.bz2 Ishtar-987ce8f23e4affcffe750845d59576d9ccf88bc4.zip |
Containers: allow direct import of localisation
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/models_finds.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 65850d4dc..8be440181 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1147,6 +1147,18 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel, def localisation_6(self): return self.get_localisation(5) + @property + def localisation_7(self): + return self.get_localisation(6) + + @property + def localisation_8(self): + return self.get_localisation(7) + + @property + def localisation_9(self): + return self.get_localisation(8) + def set_localisation(self, place, context, value): if not self.container: if not value: @@ -1185,6 +1197,18 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel, def set_localisation_6(self, context, value): return self.set_localisation(5, context, value) + @post_importer_action + def set_localisation_7(self, context, value): + return self.set_localisation(6, context, value) + + @post_importer_action + def set_localisation_8(self, context, value): + return self.set_localisation(7, context, value) + + @post_importer_action + def set_localisation_9(self, context, value): + return self.set_localisation(8, context, value) + def generate_index(self): """ Generate index based on operation or context record (based on |