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
Titouan Soulard
slapos.core
Commits
98947883
Commit
98947883
authored
Sep 07, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Fix query to catalog and allow re-apply conditions to the subscription
parent
91d60711
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_applyCondition.py
...ubscription_request/SubscriptionRequest_applyCondition.py
+13
-4
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_applyCondition.xml
...bscription_request/SubscriptionRequest_applyCondition.xml
+9
-1
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_applyCondition.py
View file @
98947883
...
@@ -2,10 +2,19 @@ from zExceptions import Unauthorized
...
@@ -2,10 +2,19 @@ from zExceptions import Unauthorized
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
raise
Unauthorized
raise
Unauthorized
subscription_condition
=
context
.
portal_catalog
(
if
subscription_condition_reference
is
not
None
:
portal_type
=
"Subscription Condition"
,
# It would be better use some clever API here.
reference
=
subscription_reference
,
subscription_condition
=
context
.
portal_catalog
.
getResultValue
(
validation_state
=
"validated"
)
portal_type
=
"Subscription Condition"
,
reference
=
subscription_condition_reference
,
validation_state
=
"validated"
)
else
:
subscription_condition
=
context
.
getSpecialiseValue
()
if
subscription_condition
is
None
:
raise
ValueError
(
"It was not possible to find the appropriate Condition %s for this Subscription"
\
%
subscription_condition_reference
)
# Get Subscription condition for this Subscription Request
# Get Subscription condition for this Subscription Request
subscription_configuration
=
{
subscription_configuration
=
{
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_applyCondition.xml
View file @
98947883
...
@@ -50,7 +50,15 @@
...
@@ -50,7 +50,15 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
subscription_reference, REQUEST=None
</string>
</value>
<value>
<string>
subscription_condition_reference=None, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
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