mirror of
https://github.com/zulip/zulip.git
synced 2026-06-18 21:01:52 +08:00
analytics: Fix nondeterministic ordering of labels.
This commit is contained in:
parent
02bd5bedce
commit
0c0e5397c4
@ -121,7 +121,7 @@ def sort_by_totals(value_arrays):
|
||||
totals = []
|
||||
for label, values in value_arrays.items():
|
||||
totals.append((label, sum(values)))
|
||||
totals.sort(key=lambda label_total: label_total[1], reverse=True)
|
||||
totals.sort(key=lambda label_total: "%s:%s" % (label_total[1], label_total[0]), reverse=True)
|
||||
return [label for label, total in totals]
|
||||
|
||||
# For any given user, we want to show a fixed set of clients in the chart,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user