Skip to content

Commit

Permalink
groupadmin: handle empty user name fields
Browse files Browse the repository at this point in the history
  • Loading branch information
timhawes committed Jun 18, 2024
1 parent 790fba2 commit c22760e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion groupadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def groupadmin_list(request):
groups[group.name] = {"object": group}
if group.owners.count() > 0:
groups[group.name]["owners_text"] = ", ".join(
sorted(owner.user.get_full_name() for owner in group.owners.all())
sorted(
owner.user.get_full_name() or owner.user.get_username()
for owner in group.owners.all()
)
)

context = {"groups": [groups[name] for name in sorted(groups.keys())]}
Expand Down

0 comments on commit c22760e

Please sign in to comment.