Skip to content

Commit

Permalink
fix(pci-instance): reset workflow only when unavailable
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Chaumet <[email protected]>
  • Loading branch information
SimonChaumet committed Feb 13, 2025
1 parent 4083f78 commit 02a1ae6
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,20 @@ export default class PciInstancesAddController {
this.flavor.type,
)
) {
this.automatedBackup.selected = false;
this.automatedBackup.schedule = null;
this.automatedBackup.price = null;

const plan = this.snapshotAvailability[this.instance.region].plans[0];
this.automatedBackup.price = this.formatBackupMonthlyPrice(plan.price);
if (
!this.snapshotAvailability[this.instance.region] ||
!this.snapshotAvailability[this.instance.region].plans.length ||
!this.snapshotAvailability[this.instance.region].workflow
) {
this.automatedBackup.selected = false;
this.automatedBackup.schedule = null;
this.automatedBackup.price = null;
} else {
const plan = this.snapshotAvailability[this.instance.region].plans[0];
this.automatedBackup.price = this.formatBackupMonthlyPrice(
plan.price,
);
}

return this.automatedBackup.price;
}
Expand Down

0 comments on commit 02a1ae6

Please sign in to comment.