Skip to content

Commit

Permalink
Merge 48c4079 into e463aee
Browse files Browse the repository at this point in the history
  • Loading branch information
boulch committed Apr 20, 2020
2 parents e463aee + 48c4079 commit 28e70c2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@ Changelog
1.32 (unreleased)
-----------------

- Nothing changed yet.
- Added upgrade step for display_below_content_title_on_views. Fix for instances have not this registry key yet.
[boulch]


1.31 (2020-04-07)
Expand Down
11 changes: 10 additions & 1 deletion src/collective/contact/core/upgrades/configure.zcml
Expand Up @@ -167,9 +167,18 @@
handler=".upgrades.v16"
profile="collective.contact.core:default" />

<genericsetup:upgradeSteps
<genericsetup:upgradeStep
title="Upgrade from 16 to 17"
description="Use belowcontenttitle viewlet on contact views."
source="16"
destination="17"
handler=".upgrades.v17"
profile="collective.contact.core:default" />


<genericsetup:upgradeSteps
source="17"
destination="18"
profile="collective.contact.core:default">
<genericsetup:upgradeDepends
title="Reapply registry.xml"
Expand Down
8 changes: 8 additions & 0 deletions src/collective/contact/core/upgrades/upgrades.py
Expand Up @@ -119,3 +119,11 @@ def v16(context):
tool.runImportStep('collective.contact.core', 'plone.app.registry')
tool.runImportStep('collective.contact.core', 'catalog')
tool.reindexContents(IContactContent, ('email', 'contact_source',))

def v17(context):
IUpgradeTool(context).runImportStep('collective.contact.core', 'typeinfo')
IUpgradeTool(context).runImportStep('collective.contact.core', 'plone.app.registry')
val = api.portal.get_registry_record(name='display_below_content_title_on_views', interface=IContactCoreParameters)
if val is None:
api.portal.set_registry_record(name='display_below_content_title_on_views', value=False,
interface=IContactCoreParameters)

0 comments on commit 28e70c2

Please sign in to comment.