summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quoins/controllers.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/quoins/controllers.py b/quoins/controllers.py
index bb7bcfe..7bdb295 100644
--- a/quoins/controllers.py
+++ b/quoins/controllers.py
@@ -513,12 +513,13 @@ Comment:
513 start=int(start) 513 start=int(start)
514 except: 514 except:
515 raise tg.exceptions.HTTPNotFound().exception 515 raise tg.exceptions.HTTPNotFound().exception
516 blog = DBSession.query(Blog).get(1)
517
518 if not name: 516 if not name:
519 flash('Please supply the name of an author.') 517 raise tg.exceptions.HTTPNotFound().exception
520 redirect(self.url('/')) 518
519 blog = DBSession.query(Blog).get(1)
521 posts = blog.getPostsByAuthor(name) 520 posts = blog.getPostsByAuthor(name)
521 if not posts:
522 raise tg.exceptions.HTTPNotFound().exception
522 d = post_paginate(start, posts, self.post_paginate) 523 d = post_paginate(start, posts, self.post_paginate)
523 d.update(dict(quoins = self, 524 d.update(dict(quoins = self,
524 blog = blog, 525 blog = blog,