On application mount, check/create metadata branch

This commit is contained in:
Cássio Zen
2016-08-30 19:06:20 -03:00
parent 672b43f153
commit 388cada3de
3 changed files with 235 additions and 198 deletions

View File

@ -103,7 +103,7 @@ class Backend {
}
persistEntry(config, collection, entryDraft, MediaFiles) {
const mode = this.getPublishMode(config);
const newEntry = entryDraft.getIn(['entry', 'newRecord']) || false;
const entryData = entryDraft.getIn(['entry', 'data']).toJS();
let entryObj;
@ -126,7 +126,11 @@ class Backend {
collection.get('label') + ' “' +
entryDraft.getIn(['entry', 'data', 'title']) + '”';
return this.implementation.persistEntry(entryObj, MediaFiles, { newEntry, commitMessage, mode });
const mode = this.getPublishMode(config);
const collectionName = collection.get('name');
return this.implementation.persistEntry(entryObj, MediaFiles, { newEntry, commitMessage, collectionName, mode });
}
entryToRaw(collection, entry) {