Skip to content

Commit

Permalink
fixed upgrade step for add desc to pdc
Browse files Browse the repository at this point in the history
  • Loading branch information
eikichi18 committed Jan 23, 2024
1 parent 53b014d commit 24a7b9d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<version>7021</version>
<version>7023</version>
<dependencies>
<dependency>profile-redturtle.bandi:default</dependency>
<dependency>profile-collective.venue:default</dependency>
Expand Down
7 changes: 4 additions & 3 deletions src/design/plone/contenttypes/upgrades/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,13 @@
</genericsetup:upgradeSteps>
<genericsetup:upgradeSteps
profile="design.plone.contenttypes:default"
source="7021"
destination="7022"
source="7022"
destination="7023"
>
<genericsetup:upgradeStep
title="Update PDC with new pdc_description field"
title="Update PDC with new pdc_description field (fix)"
handler=".upgrades.update_pdc_with_pdc_desc"
/>
</genericsetup:upgradeSteps>

</configure>
4 changes: 4 additions & 0 deletions src/design/plone/contenttypes/upgrades/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -1572,4 +1572,8 @@ def update_pdc_with_pdc_desc(context):
if not v.get("pdc_desc", None):
v["pdc_desc"] = None
logger.info(f"Set pdc_desc for {pdc.absolute_url()}")

pdc.value_punto_contatto = value_punto_contatto

commit()
logger.info("Ends of update")

0 comments on commit 24a7b9d

Please sign in to comment.