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
1 changed files with 3 additions and 0 deletions

View File

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