From 008654ad5d64e71eb48b771eea9b8cd30bfba7af Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 7 Jun 2013 11:13:01 +0200 Subject: [PATCH] fix api documentation for double decorators --- ox/django/api/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/django/api/actions.py b/ox/django/api/actions.py index f651e18..6a41632 100644 --- a/ox/django/api/actions.py +++ b/ox/django/api/actions.py @@ -111,7 +111,7 @@ class ApiActions(dict): else: f = self[name] if name != 'api' and hasattr(f, 'func_closure') and f.func_closure: - f = f.func_closure[0].cell_contents + f = f.func_closure[len(f.func_closure)-1].cell_contents info = f.func_code.co_filename[len(settings.PROJECT_ROOT)+1:] info = u'%s:%s' % (info, f.func_code.co_firstlineno) return info, trim(inspect.getsource(f))