From: Andrew Browning Date: Sun, 8 Jul 2018 23:00:52 +0000 (-0400) Subject: Fix server crash on blog about page [#5572] X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=588162b861f4993ee8412b14601b215505134bfc;p=mediagoblin.git Fix server crash on blog about page [#5572] Don't bother checking for user's blog if no user returned. --- 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)