Passes only metadatum id inside of metadatum POST in filter action.
This commit is contained in:
parent
1656d4a2d6
commit
9109eb8c3a
|
@ -244,7 +244,7 @@ export default {
|
|||
saveEdition(filter) {
|
||||
|
||||
if ((filter.filter_type_object && filter.filter_type_object.form_component) || filter.edit_form == '') {
|
||||
|
||||
|
||||
// this.fillExtraFormData(this.editForm);
|
||||
this.updateFilter({ filterId: filter.id, index: this.index, options: this.editForm})
|
||||
.then(() => {
|
||||
|
|
|
@ -573,6 +573,7 @@ export default {
|
|||
this.newFilterIndex = 0;
|
||||
}
|
||||
this.openedFilterId = filter.id;
|
||||
|
||||
// First time opening
|
||||
if (this.editForms[this.openedFilterId] == undefined) {
|
||||
this.editForms[this.openedFilterId] = JSON.parse(JSON.stringify(filter));
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
.catch(error => {
|
||||
this.$console.log(error);
|
||||
});
|
||||
|
||||
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTags);
|
||||
},
|
||||
data(){
|
||||
|
|
|
@ -67,6 +67,10 @@ export const sendFilter = ( { commit }, { collectionId, metadatumId, name, filte
|
|||
};
|
||||
|
||||
export const updateFilter = ( { commit }, { filterId, index, options }) => {
|
||||
|
||||
if (options['metadatum'] != undefined && options['metadatum']['metadatum_id'] != undefined)
|
||||
options['metadatum'] = options['metadatum']['metadatum_id'];
|
||||
|
||||
return new Promise(( resolve, reject ) => {
|
||||
let endpoint = '/filters/' + filterId;
|
||||
options['context'] = 'edit';
|
||||
|
|
Loading…
Reference in New Issue