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=cd465ebfec837a75a44c4ebd727dffe2fff6d850;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 4b6ea7b7..9ca5518e 100644 --- a/mediagoblin/media_types/blog/views.py +++ b/mediagoblin/media_types/blog/views.py @@ -360,7 +360,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)