From: W. Trevor King Date: Fri, 23 Jul 2010 23:14:28 +0000 (-0400) Subject: Adjust tag hyperlinking to handle .tags == None X-Git-Tag: v0.1~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=271e7ea917b8a93afa54578d49f3fdfaf4916c16;p=cookbook.git Adjust tag hyperlinking to handle .tags == None --- diff --git a/cookbook/server.py b/cookbook/server.py index 28d1142..e62dd84 100644 --- a/cookbook/server.py +++ b/cookbook/server.py @@ -85,7 +85,7 @@ class Server (object): recipe = self.cookbook.index[name] tag_links = [ '%s' % (urlencode({'tag':t}), t) - for t in recipe.tags] + for t in (recipe.tags or [])] template = self.env.get_template('recipe.html') return template.render(cookbook=self.cookbook, recipe=recipe, tag_links=tag_links)