call func attr

master
inpos 2018-08-16 19:27:06 +03:00
parent 9ac58b2323
commit 0e18a1c406
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class ExtApplication(cp.Application):
def ajax_callback(self, *args, **kwargs):
fn = kwargs.pop('fn')
if fn:
fn = js.live_methods[int(fn)]
fn = js.live_methods[int(fn)].func
fn(*args, **kwargs)
return str(js.js_manager)
@ -37,7 +37,7 @@ class ExtApplication(cp.Application):
def ajax_func_callback(self, *args, **kwargs):
fn = kwargs.pop('fn')
if fn:
fn = js.live_methods[int(fn)]
fn = js.live_methods[int(fn)].func
res = fn(*args, **kwargs)
return {
'data': res