Skip to content

Commit

Permalink
chg: [organization_bp] Improved members view.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Oct 25, 2023
1 parent b002c4e commit 30f5f10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mosp/views/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ def leave(org_id):
def members(org_id):
"""Returns the list of members of an organization."""
org = Organization.query.filter(Organization.id == org_id).first()
members = org.users
members.sort(key=lambda user: user.last_seen, reverse=True)
if org:
return render_template(
"organization_members.html", organization=org, members=members
"organization_members.html",
organization=org,
members=sorted(org.users, key=lambda user: user.last_seen, reverse=True),
)
return redirect(url_for("organization_bp.get", organization_id=org_id))

0 comments on commit 30f5f10

Please sign in to comment.