-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from eea/develop
Release 5.1
- Loading branch information
Showing
5 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
""" Upgrade to 5.1 """ | ||
from plone.dexterity.interfaces import IDexterityFTI | ||
from plone import api | ||
from zope.component import queryUtility | ||
|
||
|
||
def to_51(context): | ||
"""Disable EEA Coremetadata Organisations behavior on all content types""" | ||
|
||
portal_types = api.portal.get_tool(name='portal_types') | ||
for fti_id in portal_types.objectIds(): | ||
fti = queryUtility(IDexterityFTI, name=fti_id) | ||
|
||
if fti and 'other_organisations' in fti.behaviors: | ||
fti.behaviors = [ | ||
b for b in fti.behaviors if b != 'other_organisations'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.3 | ||
5.1 |