Skip to content

Commit

Permalink
fix: resume/active scheduling job failed
Browse files Browse the repository at this point in the history
Signed-off-by: andy.lee <[email protected]>
  • Loading branch information
a110605 committed Jan 8, 2025
1 parent e4b3f84 commit 5c95f9e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/harvester/models/harvesterhci.io.schedulevmbackup.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,7 @@ export default class ScheduleVmBackup extends HarvesterResource {
}

get state() {
const conditions = get(this, 'status.conditions');
const isSuspended = findBy(conditions, 'type', 'BackupSuspend')?.status === 'True';

if (isSuspended) {
return STATES.suspended.label;
}

return this.metadata.state.name;
return this.status?.suspended === true ? STATES.suspended.label : STATES.active.label;
}

get stateDescription() {
Expand Down

0 comments on commit 5c95f9e

Please sign in to comment.