Commit 25b36e07 authored by Sven Franck's avatar Sven Franck

set field definitions in pass if not pulling sample data

parent 66da9be3
......@@ -5456,13 +5456,13 @@
};
};
// ======================== SAMPLE DATA ==================================
/**
* Create/Update element in storage
* @method store
* @param {object} parcel object containing storage, type and pass
* @return {object} promise object/pass
*/
// TODO: storages should not call this, this should call storage!
app.store = function (reply) {
var i, obj, key, promises, record, items, store, pass, send_status,
method, validate;
......@@ -5470,6 +5470,12 @@
pass = reply.pass;
if (reply.response) {
// TODO: remove once no need for sample data
if (pass.needs_fields) {
delete pass.needs_fields;
pass.fields = util.parseIfNeeded(reply.response);
}
store = storage.items;
items = util.parseIfNeeded(reply.response);
......@@ -5622,6 +5628,7 @@
if (pass.skip === undefined) {
if (reply.response) {
delete pass.needs_fields;
pass.fields = util.parseIfNeeded(reply.response);
}
......@@ -5664,6 +5671,8 @@
pass.mode === "new")) &&
pass.config.portal_type_fields) {
// TODO: keep this until sample handling is removed
pass.needs_fields = true;
return app.fetchConfiguration({
"storage": app.default_dict.storage_dict.settings,
"file": app.default_dict.storage_dict.data_type,
......
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