From 515f4b46ab06af1e7201a27f5a931c4763643c8e Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Wed, 16 Jan 2019 01:33:58 +0100 Subject: [PATCH] Update lock version after request --- app/assets/javascripts/task_list.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/task_list.js b/app/assets/javascripts/task_list.js index fce41ef65c4..10368ecf248 100644 --- a/app/assets/javascripts/task_list.js +++ b/app/assets/javascripts/task_list.js @@ -49,7 +49,10 @@ export default class TaskList { return axios .patch($target.data('updateUrl') || $('form.js-issuable-update').attr('action'), patchData) - .then(({ data }) => this.onSuccess(data)) .catch(({ response }) => this.onError(response.data)); + .then(({ data }) => { + this.lockVersion = data.lock_version; + return this.onSuccess(data); + }) } }