From 3548435547957bc79c034a90b35405831501cafc Mon Sep 17 00:00:00 2001 From: Ladislav Smola Date: Wed, 4 Sep 2013 13:56:19 +0200 Subject: [PATCH] Do not run preemptive actions twice When table action is preemptive , it needs to run only once, before the table data is loaded. Fixes bug 1182661 Change-Id: Ibb7ed5f97f64cfc9e56b317ed9d4b5e8cbf8cc8c --- horizon/tables/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/horizon/tables/base.py b/horizon/tables/base.py index 3c690217b8..adc284c9ea 100644 --- a/horizon/tables/base.py +++ b/horizon/tables/base.py @@ -1249,7 +1249,11 @@ class DataTable(object): request = self.request table_name, action_name, obj_id = self.check_handler(request) if table_name == self.name and action_name: - return self.take_action(action_name, obj_id) + action_names = [action.name for action in + self.base_actions.values() if not action.preempt] + # do not run preemptive actions here + if action_name in action_names: + return self.take_action(action_name, obj_id) return None def sanitize_id(self, obj_id):