Commit 1362267d authored by Fatih Acet's avatar Fatih Acet

Fix data coming down to error handler of tasklist

parent 83306d24
No related merge requests found
<script>
import $ from 'jquery';
import createFlash from '~/flash';
import animateMixin from '../mixins/animate';
import TaskList from '../../task_list';
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
......@@ -89,7 +90,7 @@ export default {
},
taskListUpdateError(data) {
// stub for error handling
createFlash(data.errors[0]);
},
updateTaskStatusText() {
......
......@@ -44,12 +44,12 @@ export default class TaskList {
const patchData = {};
patchData[this.dataType] = {
[this.fieldName]: $target.val(),
['lock_version']: this.lockVersion,
lock_version: this.lockVersion,
};
return axios
.patch($target.data('updateUrl') || $('form.js-issuable-update').attr('action'), patchData)
.then(({ data }) => this.onSuccess(data))
.catch(err => this.onError(err));
.catch(({ response }) => this.onError(response.data));
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment