Fix data coming down to error handler of tasklist
This commit is contained in:
parent
83306d249e
commit
1362267d45
|
@ -1,5 +1,6 @@
|
|||
<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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue