Skip to content

Commit

Permalink
Use failover get method.
Browse files Browse the repository at this point in the history
  • Loading branch information
esteele committed Sep 17, 2015
1 parent 7bd8c8c commit 936baf2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plone/app/widgets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces import ITypesSchema
from plone.registry.interfaces import IRegistry
from datetime import datetime
from plone.app.layout.navigation.root import getNavigationRootObject
Expand Down Expand Up @@ -138,10 +137,9 @@ def get_relateditems_options(context, value, separator, vocabulary_name,
context=request)
options.setdefault('homeText', msgstr)
options.setdefault('folderTypes', ['Folder'])

registry = getUtility(IRegistry)
settings = registry.forInterface(ITypesSchema, prefix="plone")
options['folderTypes'] = settings.types_link_to_folder_contents
options['folderTypes'] = registry.get(
'plone.types_link_to_folder_contents', [])

return options

Expand Down

0 comments on commit 936baf2

Please sign in to comment.