Commit 44b63122 by Rafael Monnerat

slapos_jio: Allow Intent API request specific Software Release (and not the latest)

1 parent 312f151d
......@@ -70,9 +70,11 @@
.push(function () {
return gadget.getSetting("hateoas_url")
.push(function (url) {
return gadget.jio_getAttachment("/",
url + "/SoftwareProduct_getSoftwareReleaseAsHateoas?software_release=" + options.software_release
);
var get_attachement_url = url + "/SoftwareProduct_getSoftwareReleaseAsHateoas?software_release=" + options.software_release;
if (options.strict === "True") {
get_attachement_url = get_attachement_url + "&strict:int=1";
}
return gadget.jio_getAttachment("/", get_attachement_url);
});
})
.push(function (jio_key) {
......
......@@ -259,7 +259,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.43754.24433.51490</string> </value>
<value> <string>965.45338.57463.57856</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1519405132.53</float>
<float>1521716721.0</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,7 +3,7 @@ import json
if software_release.startswith("product."):
software_release_list = context.SoftwareProduct_getSortedSoftwareReleaseList(software_product_reference=software_release[8:])
else:
software_release_list = context.SoftwareProduct_getSortedSoftwareReleaseList(software_release_url=software_release)
software_release_list = context.SoftwareProduct_getSortedSoftwareReleaseList(software_release_url=software_release, strict=strict)
if len(software_release_list):
software_release_document = software_release_list[0]
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>software_release</string> </value>
<value> <string>software_release, strict=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!