From 6289a6012ea767995bfaf36922c76be024e61d58 Mon Sep 17 00:00:00 2001 From: Di M Date: Tue, 5 Nov 2024 15:30:37 +0200 Subject: [PATCH] Swaps 7th parliament with 6th and fixes a alignment issue on mesages block --- pombola/south_africa/templates/core/person_detail.html | 2 +- pombola/south_africa/views/person.py | 4 ++++ pombola/writeinpublic/templates/writeinpublic/messages.html | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pombola/south_africa/templates/core/person_detail.html b/pombola/south_africa/templates/core/person_detail.html index 58d009ecf..bcf8bf749 100644 --- a/pombola/south_africa/templates/core/person_detail.html +++ b/pombola/south_africa/templates/core/person_detail.html @@ -407,7 +407,7 @@

Former positions:

Public messages sent to this politician

-
+

Fetching the latest messages to {{ object.name }} …

diff --git a/pombola/south_africa/views/person.py b/pombola/south_africa/views/person.py index 467ebdb0c..8508c6e70 100644 --- a/pombola/south_africa/views/person.py +++ b/pombola/south_africa/views/person.py @@ -361,6 +361,10 @@ def get_attendance_stats(self, attendance_by_year): } ) + # 2024 is split for 6th and 7th parliament. This puth 7th parliament before 6th in the list. + if return_data[0]['year'] == '2024 (6th Parliament)': + return_data.insert(1, return_data.pop(0)) + return return_data def get_attendance_data_for_display(self): diff --git a/pombola/writeinpublic/templates/writeinpublic/messages.html b/pombola/writeinpublic/templates/writeinpublic/messages.html index c5d2b8551..265a31547 100644 --- a/pombola/writeinpublic/templates/writeinpublic/messages.html +++ b/pombola/writeinpublic/templates/writeinpublic/messages.html @@ -47,9 +47,11 @@

{% empty %} +

No messages!

+
{% endfor %}