File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/design/plone/contenttypes/upgrades Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ Changelog
446.3.6 (unreleased)
55------------------
66
7- - Nothing changed yet.
7+ - Fixed upgrade steps for Persona CT to prevent breakage due to ConstrainTypes restrictions
8+ [lucabel]
89
910
10116.3.5 (2025-04-02)
Original file line number Diff line number Diff line change @@ -253,6 +253,10 @@ def to_7314(context):
253253 brains = pc (portal_type = "Persona" )
254254 for brain in brains :
255255 persona = brain .getObject ()
256+ actual_contraints = ISelectableConstrainTypes (persona )
257+ actual_constrain_type = actual_contraints .getConstrainTypesMode ()
258+ # devo poter aggiungere
259+ actual_contraints .setConstrainTypesMode (0 )
256260 if (
257261 "dichiarazione-insussistenza-cause-di-inconferibilita-e-incompatibilita"
258262 not in persona .keys ()
@@ -265,3 +269,5 @@ def to_7314(context):
265269 ):
266270 createStructure (persona , mapping2 )
267271 logger .info ("Add emolumenti complessivi for {}" .format (persona .title ))
272+ # reimposto il valore precedente del constraintypes
273+ actual_contraints .setConstrainTypesMode (actual_constrain_type )
You can’t perform that action at this time.
0 commit comments