summaryrefslogtreecommitdiff
path: root/horizon/horizon/tables/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'horizon/horizon/tables/actions.py')
-rw-r--r--horizon/horizon/tables/actions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/horizon/horizon/tables/actions.py b/horizon/horizon/tables/actions.py
index 8b15b3865..38fccd62b 100644
--- a/horizon/horizon/tables/actions.py
+++ b/horizon/horizon/tables/actions.py
@@ -57,6 +57,12 @@ class BaseAction(object):
"""
return True
+ def _allowed(self, request, datum):
+ """ Default allowed checks for certain actions """
+ if isinstance(self, BatchAction) and not self.table.data:
+ return False
+ return self.allowed(request, datum)
+
def update(self, request, datum):
""" Allows per-action customization based on current conditions.