diff --git a/master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_managePublicComputerCapacityScope.xml b/master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_managePublicComputerCapacityScope.xml index 003b3ed6cf6f0b3eabdcaa68395968abf6a89820..7509b4f32ca8a0f0caab25d826a16b62ea9f2ed1 100644 --- a/master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_managePublicComputerCapacityScope.xml +++ b/master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_managePublicComputerCapacityScope.xml @@ -52,13 +52,15 @@ <key> <string>_body</string> </key> <value> <string>portal = context.getPortalObject()\n \n -portal.portal_catalog.searchAndActivate(\n - portal_type=\'Computer\',\n - default_allocation_scope_uid=portal.restrictedTraverse("portal_categories/allocation_scope/open/public").getUid(),\n - validation_state="validated",\n - method_id=\'Computer_checkAndUpdateCapacityScope\',\n - activate_kw={\'tag\': tag}\n -)\n +category = portal.restrictedTraverse("portal_categories/allocation_scope/open/public", None)\n +if category is not None:\n + portal.portal_catalog.searchAndActivate(\n + portal_type=\'Computer\',\n + default_allocation_scope_uid=category.getUid(),\n + validation_state="validated",\n + method_id=\'Computer_checkAndUpdateCapacityScope\',\n + activate_kw={\'tag\': tag}\n + )\n context.activate(after_tag=tag).getId()\n </string> </value> </item> diff --git a/master/bt5/slapos_cloud/bt/revision b/master/bt5/slapos_cloud/bt/revision index aa59885c836ad82e8a621dbdde0bf9fb7a80c346..70e1a64c23f0dc1eb79598f64221bd0c38f18b97 100644 --- a/master/bt5/slapos_cloud/bt/revision +++ b/master/bt5/slapos_cloud/bt/revision @@ -1 +1 @@ -143 \ No newline at end of file +144 \ No newline at end of file