summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <corvus@gnu.org>2010-04-03 18:59:19 (GMT)
committerJames E. Blair <corvus@gnu.org>2010-04-03 18:59:19 (GMT)
commit9d3c7f43ee94524d91b59d1a1850581ee52b9a33 (patch)
treedaaf59c919a8687b4a770418013b39e209fde346
parent48d0eda8d6f8dc40a8cd6e9874c8145f81c28e6a (diff)
Handle bad arguments to post method.
-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: