Fix sort groupe (#py3)

This commit is contained in:
Emmanuel Viennet 2021-09-16 00:16:50 +02:00
parent 0fedb7771c
commit 9578c789dc
1 changed files with 1 additions and 1 deletions

View File

@ -1499,7 +1499,7 @@ def _sortgroups(groups):
# Tri: place 'all' en tête, puis groupe par partition / nom de groupe
R = [g for g in groups if g["partition_name"] is None]
o = [g for g in groups if g["partition_name"] != None]
o.sort(key=lambda x: (x["numero"], x["group_name"]))
o.sort(key=lambda x: (x["numero"] or 0, x["group_name"]))
return R + o