@@ -1579,26 +1579,6 @@ def update_pdc_with_pdc_desc(context):
1579
1579
logger .info ("Ends of update" )
1580
1580
1581
1581
1582
- def to_7030 (context ):
1583
- installOrReinstallProduct (api .portal .get (), "collective.volto.enhancedlinks" )
1584
- # add behavior to modulo
1585
- portal_types = api .portal .get_tool (name = "portal_types" )
1586
- modulo_behaviors = [x for x in portal_types ["Modulo" ].behaviors ]
1587
- if "volto.enhanced_links_enabled" not in modulo_behaviors :
1588
- modulo_behaviors .append ("volto.enhanced_links_enabled" )
1589
- portal_types ["Modulo" ].behaviors = tuple (modulo_behaviors )
1590
-
1591
- # update index/metadata
1592
- brains = api .content .find (portal_type = ["File" , "Image" , "Modulo" ])
1593
- tot = len (brains )
1594
- i = 0
1595
- for brain in brains :
1596
- i += 1
1597
- if i % 100 == 0 :
1598
- logger .info ("Progress: {}/{}" .format (i , tot ))
1599
- brain .getObject ().reindexObject (idxs = ["enhanced_links_enabled" ])
1600
-
1601
-
1602
1582
def add_canale_digitale_link_index (context ):
1603
1583
update_catalog (context )
1604
1584
update_registry (context )
@@ -1616,3 +1596,23 @@ def to_7031(context):
1616
1596
for ptype in ["News Item" ]:
1617
1597
portal_types [ptype ].default_view = "view"
1618
1598
portal_types [ptype ].view_methods = ["view" ]
1599
+
1600
+
1601
+ def to_7100 (context ):
1602
+ installOrReinstallProduct (api .portal .get (), "collective.volto.enhancedlinks" )
1603
+ # add behavior to modulo
1604
+ portal_types = api .portal .get_tool (name = "portal_types" )
1605
+ modulo_behaviors = [x for x in portal_types ["Modulo" ].behaviors ]
1606
+ if "volto.enhanced_links_enabled" not in modulo_behaviors :
1607
+ modulo_behaviors .append ("volto.enhanced_links_enabled" )
1608
+ portal_types ["Modulo" ].behaviors = tuple (modulo_behaviors )
1609
+
1610
+ # update index/metadata
1611
+ brains = api .content .find (portal_type = ["File" , "Image" , "Modulo" ])
1612
+ tot = len (brains )
1613
+ i = 0
1614
+ for brain in brains :
1615
+ i += 1
1616
+ if i % 100 == 0 :
1617
+ logger .info ("Progress: {}/{}" .format (i , tot ))
1618
+ brain .getObject ().reindexObject (idxs = ["enhanced_links_enabled" ])
0 commit comments