You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/10/10 18:46:30 UTC
[incubator-superset] branch master updated: [bugfix] Template
rendering failed: '_AppCtxGlobals' object has no attribute 'user' (#3637)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new b866b33 [bugfix] Template rendering failed: '_AppCtxGlobals' object has no attribute 'user' (#3637)
b866b33 is described below
commit b866b33dee5bad568f1533f45b3f36ecca9c05be
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue Oct 10 11:46:28 2017 -0700
[bugfix] Template rendering failed: '_AppCtxGlobals' object has no attribute 'user' (#3637)
Somehow the nature of `g` in Flask has changed where `g.user` used to
be provided outside the web request scope and its not anymore.
The fix here should address that.
---
superset/jinja_context.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/jinja_context.py b/superset/jinja_context.py
index e096ded..a019ed3 100644
--- a/superset/jinja_context.py
+++ b/superset/jinja_context.py
@@ -43,7 +43,7 @@ def url_param(param, default=None):
def current_user_id():
"""The id of the user who is currently logged in"""
- if g.user:
+ if hasattr(g, 'user') and g.user:
return g.user.id
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].