diff --git a/src/modules/modals/EditContext.vue b/src/modules/modals/EditContext.vue index 09b50cb3a..36b17d1df 100644 --- a/src/modules/modals/EditContext.vue +++ b/src/modules/modals/EditContext.vue @@ -145,13 +145,7 @@ export default { nodes: dataResources, } - const share = { - nodeType: 'context', - nodeId: this.contextId, - receiverType: 'user', - displayMode: 2, - } - const res = await this.$store.dispatch('updateContext', { id: this.contextId, data, share, receivers: this.receivers }) + const res = await this.$store.dispatch('updateContext', { id: this.contextId, data, receivers: this.receivers }) if (res) { showSuccess(t('tables', 'Updated context "{contextTitle}".', { contextTitle: this.title })) this.actionCancel() diff --git a/src/store/store.js b/src/store/store.js index 878e0ec8a..e81561b8d 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -339,8 +339,13 @@ export default new Vuex.Store({ return true }, - async updateContext({ state, commit, dispatch }, { id, data, share, receivers }) { + async updateContext({ state, commit, dispatch }, { id, data, receivers }) { let res = null + let share = { + nodeType: 'context', + nodeId: id, + displayMode: 2, + } try { res = await axios.put(generateOcsUrl('/apps/tables/api/2/contexts/' + id), data)