forked from gergely/calendar-social
[Refactor] Make the session list a list comprehension in account.py
This commit is contained in:
parent
26d58daac4
commit
e45726fd7c
@ -206,11 +206,8 @@ class AccountBlueprint(Blueprint, RoutedMixin):
|
|||||||
"""View the list of active sessions
|
"""View the list of active sessions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
sessions = []
|
sessions = [current_app.session_interface.load_session(sid)
|
||||||
|
for sid in current_user.active_sessions]
|
||||||
for sid in current_user.active_sessions:
|
|
||||||
session = current_app.session_interface.load_session(sid)
|
|
||||||
sessions.append(session)
|
|
||||||
|
|
||||||
return render_template('account/active-sessions.html', sessions=sessions)
|
return render_template('account/active-sessions.html', sessions=sessions)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user