[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
|
||||
"""
|
||||
|
||||
sessions = []
|
||||
|
||||
for sid in current_user.active_sessions:
|
||||
session = current_app.session_interface.load_session(sid)
|
||||
sessions.append(session)
|
||||
sessions = [current_app.session_interface.load_session(sid)
|
||||
for sid in current_user.active_sessions]
|
||||
|
||||
return render_template('account/active-sessions.html', sessions=sessions)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user