From 795efd6b58a0d4eec002eddeb4c9b0b16461a4a0 Mon Sep 17 00:00:00 2001 From: zorun Date: Mon, 4 May 2020 23:06:35 +0200 Subject: Fix order of participants in the statistics page (#608) This fixes #607 and add a test case for this bug. It also renames participants in test cases to avoid alphabetical ordering. Inserting participants in alphabetical order is a special case, because ordering by ID will be the same as ordering by name. This is a bad idea in test cases, as #607 has shown. --- ihatemoney/templates/statistics.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ihatemoney/templates/statistics.html') diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index 7321188..b38abb1 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -9,7 +9,7 @@ {{ _("Balance") }} - {% for stat in members_stats| sort(attribute='member.name') %} + {% for stat in members_stats|sort(attribute='member.name') %} {{ stat.member.name }} @@ -27,7 +27,7 @@ - {% for stat in members_stats %} + {% for stat in members_stats|sort(attribute='member.name') %} -- cgit v1.1
{{ _("Who?") }}{{ _("Paid") }}{{ _("Spent") }}
{{ stat.member.name }} {{ "%0.2f"|format(stat.paid) }}