From d514f5418932044b721ccd13080cffa611f04f6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org>
Date: Sat, 16 Apr 2022 15:20:17 +0200
Subject: [PATCH] Correct typo in `_hx_home` (when no NewsItems are present)

---
 scipost_django/scipost/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scipost_django/scipost/views.py b/scipost_django/scipost/views.py
index 6f1c457b7..6bfcd2f77 100644
--- a/scipost_django/scipost/views.py
+++ b/scipost_django/scipost/views.py
@@ -187,7 +187,7 @@ def portal_hx_home(request):
     if NewsItem.objects.homepage().exists():
         news_items = NewsItem.objects.homepage().order_by("-date")[:3]
     else:
-        news_item = NewsItem.objects.none()
+        news_items = NewsItem.objects.none()
     context = {
         "news_items": news_items,
         "publications": Publication.objects.published()
-- 
GitLab