From 194e9665e29e791eded55e48f8afa29c61da9052 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?C=C3=A9lestin=20Matte?= Date: Thu, 3 Feb 2022 09:18:21 +0100 Subject: [PATCH 2/2] Avoid possible crash in views.py when parentid is null --- django/archives/mailarchives/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py index e5bbe51..ca35439 100644 --- a/django/archives/mailarchives/views.py +++ b/django/archives/mailarchives/views.py @@ -477,13 +477,12 @@ def message(request, msgid): responses = [t for t in threadstruct if t['parentid'] == m.id] + parent = None if m.parentid: for t in threadstruct: if t['id'] == m.parentid: parent = t break - else: - parent = None nextprev = _get_nextprevious(listmap, m.date) r = render_nav(NavContext(request, lists[0].listid, lists[0].listname), 'message.html', { -- 2.34.1