From fff6153f153eec7f950170ab027856adb9cacf6c Mon Sep 17 00:00:00 2001 From: "andy.lee" Date: Mon, 13 Jan 2025 14:13:00 +0800 Subject: [PATCH] fix: resume schedule job error Signed-off-by: andy.lee (cherry picked from commit 811635801142961905cf273bbba1a6186b399b44) --- pkg/harvester/models/harvesterhci.io.schedulevmbackup.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/harvester/models/harvesterhci.io.schedulevmbackup.js b/pkg/harvester/models/harvesterhci.io.schedulevmbackup.js index 758977be..7fedea76 100644 --- a/pkg/harvester/models/harvesterhci.io.schedulevmbackup.js +++ b/pkg/harvester/models/harvesterhci.io.schedulevmbackup.js @@ -64,6 +64,10 @@ export default class ScheduleVmBackup extends HarvesterResource { } } + get stateObj() { + return this?.metadata?.state || {}; + } + get state() { return this.status?.suspended === true ? STATES.suspended.label : STATES.active.label; }