From 79f909a50190a879a04d853a4fd0e89e3bf3642d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 3 Dec 2019 14:18:03 +0100 Subject: Import: set localisation only on post save --- archaeological_warehouse/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'archaeological_warehouse') diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index beddbf55e..de567d26e 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -800,38 +800,47 @@ class Container(DocumentItem, LightHistorizedItem, QRCodeItem, GeoItem, @post_importer_action def set_localisation_1(self, context, value): return self.set_localisation(0, value) + set_localisation_1.post_save = True @post_importer_action def set_localisation_2(self, context, value): return self.set_localisation(1, value) + set_localisation_2.post_save = True @post_importer_action def set_localisation_3(self, context, value): return self.set_localisation(2, value) + set_localisation_3.post_save = True @post_importer_action def set_localisation_4(self, context, value): return self.set_localisation(3, value) + set_localisation_4.post_save = True @post_importer_action def set_localisation_5(self, context, value): return self.set_localisation(4, value) + set_localisation_5.post_save = True @post_importer_action def set_localisation_6(self, context, value): return self.set_localisation(5, value) + set_localisation_6.post_save = True @post_importer_action def set_localisation_7(self, context, value): return self.set_localisation(6, value) + set_localisation_7.post_save = True @post_importer_action def set_localisation_8(self, context, value): return self.set_localisation(7, value) + set_localisation_8.post_save = True @post_importer_action def set_localisation_9(self, context, value): return self.set_localisation(8, value) + set_localisation_9.post_save = True def get_extra_actions(self, request): """ -- cgit v1.2.3