Commit 506f646f authored by Romain Courteaud's avatar Romain Courteaud

ERP5Storage: get now set parent_relative_url if available

This ensure that document created during synchro contains the same properties on local and remote storage.
parent 78ad5715
......@@ -85,6 +85,11 @@
prefix_length,
result;
if (json._links.hasOwnProperty('parent')) {
converted_json.parent_relative_url =
new URI(json._links.parent.href).segment(2);
}
form_data_json.form_id = {
"key": [form.form_id.key],
"default": form.form_id["default"]
......
......@@ -175,6 +175,9 @@
"_links": {
type: {
name: "Person"
},
parent: {
href: "urn:jio:get:foo_module"
}
},
"_embedded": {
......@@ -244,6 +247,7 @@
.then(function (result) {
deepEqual(result, {
portal_type: "Person",
parent_relative_url: "foo_module",
reference: "bar",
reference_non_editable: "bar",
title: "foo"
......@@ -1995,6 +1999,9 @@
"_links": {
type: {
name: "Person"
},
parent: {
href: "urn:jio:get:bar_module"
}
},
"_embedded": {
......@@ -2135,6 +2142,7 @@
equal(result_list.length, 2);
deepEqual(result, {
portal_type: "Person",
parent_relative_url: "bar_module",
reference: "bar",
reference_non_editable: "bar",
title: "foo"
......
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