Quantcast
Channel: Refreshing metadata of “language neutral” objects in GS upgrade step
Viewing all articles
Browse latest Browse all 2

Refreshing metadata of “language neutral” objects in GS upgrade step

0
0

@mtrebron wrote:

I have updated my upgrade step as follows to update each language version. Works, but seems rather hardcore...

for brain in colortone_brains:
    translation_group = brain.TranslationGroup
    img_obj = brain.getObject()
    """ fixup my object
    """
    sibling_brains = catalog.searchResults( portal_type      = 'Image'
                                          , TranslationGroup = translation_group
                                          , )
    for sibling_brain in sibling_brains:
        obj_to_reindex = sibling_brain.getObject()
        catalog.catalog_object(obj_to_reindex, idxs=['color_type_lookup'])
        obj_to_reindex.reindexObject()

# almost done
catalog.manage_reindexIndex(ids=['color_type_lookup'])

Read full topic


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images