Skip to content

Commit

Permalink
remove plone.api
Browse files Browse the repository at this point in the history
  • Loading branch information
agitator committed Feb 5, 2019
1 parent 733f991 commit 40921d7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plone/app/layout/navigation/navtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from zope.contentprovider.provider import ContentProviderBase
from zope.globalrequest import getRequest
from zope.interface import implementer
import plone.api

import six

Expand Down Expand Up @@ -418,13 +417,16 @@ def navtree(self):

if generate_tabs:
query = {
'path': {'query': self.navtree_path, 'depth': self.navtree_depth},
'path': {'query': self.navtree_path,
'depth': self.navtree_depth},
'portal_type': {'query': types},
'exclude_from_nav': False,
'Language': lang_current,
'sort_on': 'getObjPositionInParent',
}
res = plone.api.content.find(**query)
portal_catalog = getToolByName(self.context, 'portal_catalog')

res = portal_catalog.searchResults(**query)

for it in res:
pathkey = '/'.join(it.getPath().split('/')[:-1])
Expand Down

0 comments on commit 40921d7

Please sign in to comment.