Sort by group name instead of group id
This commit is contained in:
parent
2d40ef471e
commit
7a2bc779f6
1 changed files with 2 additions and 2 deletions
|
@ -28,10 +28,10 @@ def list_lists(request) -> HttpResponse:
|
||||||
|
|
||||||
# Superusers see all lists
|
# Superusers see all lists
|
||||||
if request.user.is_superuser:
|
if request.user.is_superuser:
|
||||||
lists = TaskList.objects.all().order_by("group", "name")
|
lists = TaskList.objects.all().order_by("group__name", "name")
|
||||||
else:
|
else:
|
||||||
lists = TaskList.objects.filter(group__in=request.user.groups.all()).order_by(
|
lists = TaskList.objects.filter(group__in=request.user.groups.all()).order_by(
|
||||||
"group", "name"
|
"group__name", "name"
|
||||||
)
|
)
|
||||||
|
|
||||||
list_count = lists.count()
|
list_count = lists.count()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue