Commit bd7e8725 authored by Romain Courteaud's avatar Romain Courteaud

slapos_upgrader: simplify

parent cb10aab0
...@@ -29,9 +29,10 @@ if len(category_list) != len(new_category_list): ...@@ -29,9 +29,10 @@ if len(category_list) != len(new_category_list):
compute_node.setCategoryList(new_category_list) compute_node.setCategoryList(new_category_list)
# Trigger migrations of related objects # Trigger migrations of related objects
for sql_object in portal.portal_catalog( portal.portal_catalog.searchAndActivate(
method_id='Base_activateObjectMigrationToVirtualMaster',
method_args=[project_relative_url],
portal_type='Software Installation', portal_type='Software Installation',
aggregate__uid=compute_node.getUid() aggregate__uid=compute_node.getUid()
): )
relative_url_to_migrate = sql_object.getObject().getRelativeUrl()
sql_object.getObject().activate(serialization_tag='Person_checkSiteMigrationCreatePersonalVirtualMaster_%s' % relative_url_to_migrate).Base_activateObjectMigrationToVirtualMaster(project_relative_url)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment