From: Aditi Date: Mon, 29 Jul 2013 07:57:30 +0000 (+0530) Subject: Fix error in blog edit view. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=221cde571104ae4b7f5c6d47a2ddd21dc9550149;p=mediagoblin.git Fix error in blog edit view. --- diff --git a/mediagoblin/media_types/blog/views.py b/mediagoblin/media_types/blog/views.py index b353b690..1d7788cb 100644 --- a/mediagoblin/media_types/blog/views.py +++ b/mediagoblin/media_types/blog/views.py @@ -167,11 +167,8 @@ def blogpost_create(request): def blogpost_edit(request): blog_slug = request.matchdict.get('blog_slug', None) blog_post_slug = request.matchdict.get('blog_post_slug', None) - + blogpost = request.db.MediaEntry.query.filter_by(slug=blog_post_slug, uploader=request.user.id).first() blog = request.db.Blog.query.filter_by(slug=blog_slug, author=request.user.id).first() - blog_post_data = request.db.BlogPostData.query.filter_by(blog=blog.id).first() - - blogpost = blog_post_data.get_media_entry defaults = dict( title = blogpost.title,