Changeset 3511 in products


Ignore:
Timestamp:
Aug 22, 2012 10:55:48 AM (8 years ago)
Author:
kroman0
Message:

Fixed 'no record' error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/controlpanel.py

    r3153 r3511  
    11# -*- coding: utf-8 -*- 
    22from zope.i18n import translate 
     3from zope.component import getUtility 
    34from zope.schema.interfaces import ITitledTokenizedTerm 
    45 
     
    67 
    78from plone.app.registry.browser import controlpanel 
     9from plone.registry.interfaces import IRegistry 
    810 
    911from quintagroup.dropdownmenu.interfaces import IDropDownMenuSettings, _ 
     
    2527    def update(self): 
    2628        """Also get values for a few fields from portal_properties tool""" 
    27         super(DropDownMenuSettingsEditForm, self).update() 
     29        try: 
     30            super(DropDownMenuSettingsEditForm, self).update() 
     31        except KeyError: 
     32            registry = getUtility(IRegistry) 
     33            registry.registerInterface(self.schema) 
     34            super(DropDownMenuSettingsEditForm, self).update() 
    2835        conf = self._settings() 
    2936        self._overrideValue(self.widgets['show_content_tabs'], not conf[0]) 
Note: See TracChangeset for help on using the changeset viewer.