summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quoins/controllers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/quoins/controllers.py b/quoins/controllers.py
index 1db761f..b8715be 100644
--- a/quoins/controllers.py
+++ b/quoins/controllers.py
@@ -721,6 +721,8 @@ Comment:
721 # don't get .ext in our name argument. 721 # don't get .ext in our name argument.
722 name = request.environ['PATH_INFO'].split('/')[-1] 722 name = request.environ['PATH_INFO'].split('/')[-1]
723 post = DBSession.query(Post).get(post_id) 723 post = DBSession.query(Post).get(post_id)
724 if not post:
725 abort(404)
724 media = None 726 media = None
725 for m in post.media: 727 for m in post.media:
726 if m.name==name: 728 if m.name==name: