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
4
4
6.3.6 (unreleased)
5
5
------------------
6
6
7
- - Nothing changed yet.
7
+ - Fixed upgrade steps for Persona CT to prevent breakage due to ConstrainTypes restrictions
8
+ [lucabel]
8
9
9
10
10
11
6.3.5 (2025-04-02)
Original file line number Diff line number Diff line change @@ -253,6 +253,10 @@ def to_7314(context):
253
253
brains = pc (portal_type = "Persona" )
254
254
for brain in brains :
255
255
persona = brain .getObject ()
256
+ actual_contraints = ISelectableConstrainTypes (persona )
257
+ actual_constrain_type = actual_contraints .getConstrainTypesMode ()
258
+ # devo poter aggiungere
259
+ actual_contraints .setConstrainTypesMode (0 )
256
260
if (
257
261
"dichiarazione-insussistenza-cause-di-inconferibilita-e-incompatibilita"
258
262
not in persona .keys ()
@@ -265,3 +269,5 @@ def to_7314(context):
265
269
):
266
270
createStructure (persona , mapping2 )
267
271
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