From b6e5e165265b708d58d03ddbb3d34b01602867b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Wed, 25 Jan 2017 20:10:03 +0000 Subject: [PATCH] Update compileapp.py The "current" may have been altered by the controller. This is the case for admin/controllers/shell.py, in callback(), where a new shell environment is created (from gluon/shell) If this happens, the incorrect "response" is being referenced and the output of the controller is lost. --- gluon/compileapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/compileapp.py b/gluon/compileapp.py index 03529434..69a29068 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -640,7 +640,7 @@ def run_controller_in(controller, function, environment): ccode = getcfs(layer, filename, lambda: compile2(code, layer)) restricted(ccode, environment, layer=filename) - response = current.response + response = environment["response"] vars = response._vars if response.postprocessing: vars = reduce(lambda vars, p: p(vars), response.postprocessing, vars)