fix(xo-web/xoa-updater): wait trial request before checking state (#3412)

Fixes #3407
This commit is contained in:
Julien Fontanet 2018-09-14 12:26:41 +02:00 committed by GitHub
commit 3625477187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@
- [Remotes] Rename connect(ed)/disconnect(ed) to enable(d)/disable(d) [#3323](https://github.com/vatesfr/xen-orchestra/issues/3323) (PR [#3396](https://github.com/vatesfr/xen-orchestra/pull/3396))
- [Remotes] Fix error appears twice on testing (PR [#3399](https://github.com/vatesfr/xen-orchestra/pull/3399))
- [Backup NG] Don't fail on VMs with empty VBDs (like CDs or floppy disks) (PR [#3410](https://github.com/vatesfr/xen-orchestra/pull/3410))
- [XOA updater] Fix issue where trial request would fail [#3407](https://github.com/vatesfr/xen-orchestra/issues/3407) (PR [#3412](https://github.com/vatesfr/xen-orchestra/pull/3412))
### Released packages

View File

@ -280,9 +280,9 @@ class XoaUpdater extends EventEmitter {
throw new Error('You are already under trial')
}
try {
return this._call('requestTrial', { trialPlan: 'premium' })
return await this._call('requestTrial', { trialPlan: 'premium' })
} finally {
this.xoaState()
await this.xoaState()
}
}