mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[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.
This commit is contained in:
committed by
GitHub
parent
8994bdacbd
commit
b866b33dee
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user