mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
???
This commit is contained in:
parent
7e2c355edf
commit
fa296f8426
1 changed files with 3 additions and 3 deletions
|
@ -372,10 +372,10 @@ def pre_request():
|
||||||
fl_g.css = "nryg.less"
|
fl_g.css = "nryg.less"
|
||||||
fl_g.rygconf = config
|
fl_g.rygconf = config
|
||||||
fl_g.session = db.Session()
|
fl_g.session = db.Session()
|
||||||
if fl_session:
|
try:
|
||||||
fl_g.user = None
|
|
||||||
else:
|
|
||||||
fl_g.user = fl_g.session.query(db.Royal).filter_by(id=fl_session["user_id"]).one_or_none()
|
fl_g.user = fl_g.session.query(db.Royal).filter_by(id=fl_session["user_id"]).one_or_none()
|
||||||
|
except KeyError:
|
||||||
|
fl_g.user = None
|
||||||
|
|
||||||
|
|
||||||
@app.after_request
|
@app.after_request
|
||||||
|
|
Loading…
Reference in a new issue