call save callback in error

rancher/rancher#14891
This commit is contained in:
Westly Wright 2018-08-02 16:02:06 -07:00
parent d33fff67e7
commit 286499f984
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
1 changed files with 4 additions and 1 deletions

View File

@ -22,7 +22,7 @@ export default Mixin.create({
providerName: null,
actions: {
authTest() {
authTest(cb) {
this.send('clearError');
const model = get(this, 'authConfig');
@ -39,6 +39,7 @@ export default Mixin.create({
});
set(model, 'enabled', false);
cb(false);
} else {
set(this, 'testing', true);
@ -54,9 +55,11 @@ export default Mixin.create({
});
}).catch((err) => {
this.set('errors', [err]);
cb(false);
});
}).catch((err) => {
this.set('errors', [err]);
cb(false);
});
}
},