Changeset 3211 in products for quintagroup.plonetabs


Ignore:
Timestamp:
May 2, 2011 3:56:36 PM (13 years ago)
Author:
gotcha
Message:

take care of the case when there are no tabs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonetabs/branches/plone4/quintagroup/plonetabs/browser/plonetabs.py

    r3081 r3211  
    430430        portal_tabs_view = getMultiAdapter((self.context, self.request), 
    431431            name="portal_tabs_view") 
    432         return portal_tabs_view.topLevelTabs(actions=actions['portal_tabs']) 
     432        if 'portal_tabs' in actions: 
     433            actions_tabs = actions['portal_tabs'] 
     434        else: 
     435            actions_tabs = [] 
     436        return portal_tabs_view.topLevelTabs(actions=actions_tabs) 
    433437 
    434438    def selected_portal_tab(self): 
Note: See TracChangeset for help on using the changeset viewer.