Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,8 @@ def load_user():
from app.logic.loginManager import getCurrentTerm
@app.before_request
def load_currentTerm():
# An exception handles both current_term not being set and a mismatch between models
try:
g.current_term = dict_to_model(Term, session['current_term'])
except Exception as e:
term = getCurrentTerm()
session['current_term'] = model_to_dict(term)
g.current_term = term
# Query the current term from the database on each request to avoid stale session data
g.current_term = getCurrentTerm()

import datetime
@app.before_request
Expand Down
Loading