fix(xo-server-audit): handle non-existent XOA plugin (#5239)

See https://github.com/vatesfr/xen-orchestra/commit/38de5048bc2f867944546337d4a464ed19eb51a4#commitcomment-41875481
This commit is contained in:
badrAZ
2020-09-04 10:31:46 +02:00
committed by GitHub
parent 24b264b6c9
commit 9be56d3ab8
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -312,6 +312,12 @@ class AuditXoPlugin {
// See www-xo#344
async _uploadLastHash() {
const xo = this._xo
// In case of non-existent XOA plugin
if (xo.audit === undefined) {
return
}
const chain = await xo.audit.getLastChain()
let lastHash, integrityCheckSuccess