From 588162b861f4993ee8412b14601b215505134bfc Mon Sep 17 00:00:00 2001 From: Andrew Browning Date: Sun, 8 Jul 2018 19:00:52 -0400 Subject: [PATCH] Fix server crash on blog about page [#5572] Don't bother checking for user's blog if no user returned. --- mediagoblin/media_types/blog/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mediagoblin/media_types/blog/views.py b/mediagoblin/media_types/blog/views.py index f1d5c49d..2bf2e5be 100644 --- a/mediagoblin/media_types/blog/views.py +++ b/mediagoblin/media_types/blog/views.py @@ -376,7 +376,9 @@ def blog_about_view(request): user = request.db.LocalUser.query.filter( LocalUser.username==url_user ).first() - blog = get_blog_by_slug(request, blog_slug, author=user.id) + + if user: + blog = get_blog_by_slug(request, blog_slug, author=user.id) if not user or not blog: return render_404(request) -- 2.25.1