Skip to content

update upgrades method #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
6.3.5 (unreleased)
------------------


- Fix upgrade step; we can't update types due to customer customizations;
we need to fix single parts of type profiles
[lucabel]
- Add upgrade-step to add missing metadata for image captions.
[cekk]

Expand Down
9 changes: 4 additions & 5 deletions src/design/plone/contenttypes/upgrades/to_730x.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ def update_registry(context):
update_profile(context, "plone.app.registry", run_dependencies=False)


def update_types(context):
update_profile(context, "typeinfo")


def to_7301(context):
brains = api.content.find(portal_type="Persona")
for brain in brains:
Expand Down Expand Up @@ -186,7 +182,10 @@ def to_7310(context):


def to_7311(context):
update_types(context)
allowed = list(context.portal_types["Documento"].allowed_content_types)
if "File" not in allowed:
allowed.append("File")
context.portal_types["Documento"].allowed_content_types = tuple(allowed)
logger.info("Update ct documento addables")


Expand Down