From 8b2ae1eefb1b5a7b318f842b48a9bd588c5c6cd5 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Thu, 19 Mar 2020 12:25:20 -0300 Subject: [PATCH] Do not update parent object locally when updting children order. #17 --- src/views/admin/js/store/modules/metadata/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/admin/js/store/modules/metadata/actions.js b/src/views/admin/js/store/modules/metadata/actions.js index 1efd40e7d..b227d1bd9 100644 --- a/src/views/admin/js/store/modules/metadata/actions.js +++ b/src/views/admin/js/store/modules/metadata/actions.js @@ -84,7 +84,7 @@ export const updateMetadatum = ({commit}, {collectionId, metadatumId, isReposito .then(res => { let metadatum = res.data; commit('setSingleMetadatum', { metadatum: metadatum, index: index }); - + resolve(metadatum); }) .catch(error => { @@ -174,7 +174,7 @@ export const updateChildMetadataOrder = ({ commit }, {collectionId, parentMetada axios.tainacan.put('/collection/' + collectionId + '/metadata/' + parentMetadatumId + '?context=edit', body) .then(res => { const updatedParentMetadatum = res.data; - commit('setSingleMetadatum', { metadatum: updatedParentMetadatum }); + // commit('setSingleMetadatum', { metadatum: updatedParentMetadatum }); resolve(updatedParentMetadatum); }).catch(error => { reject(error.response);