Skip to content

Commit

Permalink
fix deprecation warnings from plone.base
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jul 4, 2022
1 parent f949ae8 commit f59a196
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions news/166.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix deprecation warnings from plone.base
[jensens]
15 changes: 8 additions & 7 deletions plone/app/portlets/portlets/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@
from plone.app.layout.navigation.root import getNavigationRootObject
from plone.app.uuid.utils import uuidToObject
from plone.app.vocabularies.catalog import CatalogSource
from plone.base.defaultpage import is_default_page
from plone.base.interfaces import INavigationSchema
from plone.base.interfaces import INonStructuralFolder
from plone.base.interfaces import ISiteSchema
from plone.base.utils import safe_callable
from plone.i18n.normalizer.interfaces import IIDNormalizer
from plone.memoize.instance import memoize
from plone.portlets.interfaces import IPortletDataProvider
from plone.registry.interfaces import IRegistry
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.utils import getToolByName
from Products.CMFDynamicViewFTI.interfaces import IBrowserDefault
from Products.CMFPlone import utils
from Products.CMFPlone.browser.navtree import SitemapNavtreeStrategy
from Products.CMFPlone.defaultpage import is_default_page
from Products.CMFPlone.interfaces import INavigationSchema
from Products.CMFPlone.interfaces import INonStructuralFolder
from Products.CMFPlone.interfaces import ISiteSchema
from Products.CMFPlone.utils import typesToList
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.MimetypesRegistry.MimeTypeItem import guess_icon_path
from zExceptions import NotFound
Expand Down Expand Up @@ -414,7 +415,7 @@ def __init__(self, context, portlet):

# Acquire a custom nav query if available
customQuery = getattr(context, "getCustomNavQuery", None)
if customQuery is not None and utils.safe_callable(customQuery):
if customQuery is not None and safe_callable(customQuery):
query = customQuery()
else:
query = {}
Expand Down Expand Up @@ -444,7 +445,7 @@ def __init__(self, context, portlet):
# seem to work with EPI.

# Only list the applicable types
query["portal_type"] = utils.typesToList(context)
query["portal_type"] = typesToList(context)

# Apply the desired sort
sortAttribute = navtree_properties.getProperty("sortAttribute", None)
Expand Down

0 comments on commit f59a196

Please sign in to comment.