forked from 0x2620/pandora
slightly better group sort
This commit is contained in:
parent
028def73d9
commit
bd9d2ecd7e
1 changed files with 3 additions and 1 deletions
|
@ -79,7 +79,9 @@ class SessionData(models.Model):
|
||||||
self.level = self.user.profile.level
|
self.level = self.user.profile.level
|
||||||
self.firstseen = self.user.date_joined
|
self.firstseen = self.user.date_joined
|
||||||
if self.user.groups.exists():
|
if self.user.groups.exists():
|
||||||
self.groupssort = ''.join([g.name for g in self.user.groups.all()])
|
self.groupsort = ''.join(
|
||||||
|
ox.sorted_strings(self.user.groups.all().values_list('name', flat=True))
|
||||||
|
).lower()
|
||||||
else:
|
else:
|
||||||
self.groupssort = None
|
self.groupssort = None
|
||||||
self.numberoflists = self.user.lists.count()
|
self.numberoflists = self.user.lists.count()
|
||||||
|
|
Loading…
Reference in a new issue