Adjust tag hyperlinking to handle .tags == None
authorW. Trevor King <wking@drexel.edu>
Fri, 23 Jul 2010 23:14:28 +0000 (19:14 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 23 Jul 2010 23:14:28 +0000 (19:14 -0400)
cookbook/server.py

index 28d1142391df7384c348fc3c2080c97f10160651..e62dd849106162c82e2645f9a964afc3abd46d11 100644 (file)
@@ -85,7 +85,7 @@ class Server (object):
             recipe = self.cookbook.index[name]
         tag_links = [
             '<a href="./?%s">%s</a>' % (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)