Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.core
Commits
7fcb1e34
Commit
7fcb1e34
authored
Oct 30, 2012
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent the alarm to fail if the category does not exist
parent
ffac75aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_managePublicComputerCapacityScope.xml
.../slapos_cloud/Alarm_managePublicComputerCapacityScope.xml
+9
-7
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_managePublicComputerCapacityScope.xml
View file @
7fcb1e34
...
...
@@ -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>
...
...
master/bt5/slapos_cloud/bt/revision
View file @
7fcb1e34
143
\ No newline at end of file
144
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment