From 21d434e17b1ea943921f5a19bf650df6bcc85f77 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Thu, 6 Mar 2014 13:56:29 -0500 Subject: [PATCH] [#1583] don't replace action functions with calls to get_action --- ckan/logic/__init__.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ckan/logic/__init__.py b/ckan/logic/__init__.py index eda536bcb43..59be5a43b05 100644 --- a/ckan/logic/__init__.py +++ b/ckan/logic/__init__.py @@ -447,22 +447,6 @@ def wrapped(context=None, data_dict=None, **kw): fn.side_effect_free = True _actions[action_name] = fn - - def replaced_action(action_name): - def warn(context, data_dict): - log.critical('Action `%s` is being called directly ' - 'all action calls should be accessed via ' - 'logic.get_action' % action_name) - return get_action(action_name)(context, data_dict) - return warn - - # Store our wrapped function so it is available. This is to prevent - # rewrapping of actions - module = sys.modules[_action.__module__] - r = replaced_action(action_name) - r.__replaced = fn - module.__dict__[action_name] = r - return _actions.get(action)