Skip to content

Commit

Permalink
Merge pull request #242 from plone/maurits/no-plone-api
Browse files Browse the repository at this point in the history
Replaced import of plone.api, which should not be used by core.
  • Loading branch information
gforcada authored Sep 12, 2020
2 parents d61e82b + 358e5e8 commit a867e20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions news/241.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Replaced import of plone.api, which should not be used by core.
[maurits]
3 changes: 1 addition & 2 deletions plone/app/upgrade/v52/final.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ def rebuild_redirections(context):

def move_dotted_to_named_behaviors(context):
"""named behaviors are better then dotted behaviors > let's move them."""
from plone import api
from plone.behavior.registration import lookup_behavior_registration
from plone.dexterity.interfaces import IDexterityFTI

ptt = api.portal.get_tool('portal_types')
ptt = getToolByName(context, 'portal_types')

ftis = [fti for fti in ptt.objectValues() if IDexterityFTI.providedBy(fti)]

Expand Down

0 comments on commit a867e20

Please sign in to comment.