Return groups in group order for email

This commit is contained in:
Yingtong Li 2019-02-13 15:24:26 +11:00
parent 4eec729dc2
commit 8a2bb6dfd6
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -79,6 +79,9 @@ class Group(models.Model):
if group.contains_member(member): if group.contains_member(member):
groups.add(group) groups.add(group)
groups = list(groups)
groups.sort(key=lambda group: group.order)
return groups return groups
class BulletinItem(models.Model): class BulletinItem(models.Model):