Skip to content

Commit

Permalink
Don't try to get a value on a None object
Browse files Browse the repository at this point in the history
  • Loading branch information
gamboz authored and ajrbyers committed Aug 6, 2024
1 parent 1d254f3 commit 7c8ab27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/journal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7c8ab27

Please sign in to comment.