From 7c8ab27e09d84ac9cfc31f2a39f0422a8050c339 Mon Sep 17 00:00:00 2001 From: Matteo Gamboz Date: Tue, 6 Aug 2024 13:59:02 +0200 Subject: [PATCH] Don't try to get a value on a None object --- src/journal/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/views.py b/src/journal/views.py index c282aaf5d..578ad579c 100755 --- a/src/journal/views.py +++ b/src/journal/views.py @@ -2646,7 +2646,7 @@ def serve_article_pdf(request, identifier_type, identifier): identifier, ) - if not article_object and not article_object.is_published: + if not article_object or not article_object.is_published: raise Http404 pdf = article_object.pdfs.first()