[components] Fix KeyError in possible_actions for download-links
authorVincent Michel <vincent.michel@logilab.fr>
Tue, 16 Jul 2013 16:09:12 +0200
changeset 301 a68ccc6cf620
parent 300 80b8e99351ff
child 302 8cd93f6c084c
[components] Fix KeyError in possible_actions for download-links
views/components.py
--- a/views/components.py	Tue Jul 16 16:10:35 2013 +0200
+++ b/views/components.py	Tue Jul 16 16:09:12 2013 +0200
@@ -204,7 +204,7 @@
 
     def render(self, w, **kwargs):
         possible_actions = self._cw.vreg['actions'].possible_actions(self._cw, self.cw_rset)
-        links = list(possible_actions['download-links'])
+        links = list(possible_actions.get('download-links', []))
         if links:
             w(u'<div class="well">')
             w(u'<h4>%s</h4>' % self._cw._('Download tools'))