[Refactor] Make the session list a list comprehension in account.py

This commit is contained in:
Gergely Polonkai 2018-07-23 09:46:29 +02:00
parent 26d58daac4
commit e45726fd7c

View File

@ -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)