ignore invalid blog items
This commit is contained in:
parent
57caa5d05e
commit
c26a0a14b3
1 changed files with 7 additions and 1 deletions
|
@ -611,7 +611,13 @@ def serve_blog(blog_id=None):
|
|||
if not result is None:
|
||||
return result
|
||||
# if anything fails: render the blog list
|
||||
value_dict["blog_list"] = [get_blog_info(blog_id) for blog_id in get_blog_ids()]
|
||||
blog_list = []
|
||||
# add all valid blog infos to the list
|
||||
for blog_id in get_blog_ids():
|
||||
blog_info = get_blog_info(blog_id)
|
||||
if not blog_info is None:
|
||||
blog_list.append(blog_info)
|
||||
value_dict["blog_list"] = blog_list
|
||||
return render("blog_list.html", **value_dict)
|
||||
|
||||
@bobo.query('')
|
||||
|
|
Loading…
Reference in a new issue