Skip to content

Commit

Permalink
Merge pull request #21268 from agrare/fix_incorrect_unsupported_feature
Browse files Browse the repository at this point in the history
Fix unsupported_reason_add with wrong the feature
  • Loading branch information
chessbyte authored Jun 11, 2021
2 parents 1425734 + ce1b96f commit ce672d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/vm/operations/lifecycle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Vm::Operations::Lifecycle
reason = _("Publish not supported because VM is blank") if blank?
reason ||= _("Publish not supported because VM is orphaned") if orphaned?
reason ||= _("Publish not supported because VM is archived") if archived?
unsupported_reason_add(:retire, reason) if reason
unsupported_reason_add(:publish, reason) if reason
end

api_relay_method :retire do |options|
Expand Down
2 changes: 1 addition & 1 deletion app/models/vm_or_template/operations/relocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module VmOrTemplate::Operations::Relocation
reason = _("Migrate not supported because VM is blank") if blank?
reason ||= _("Migrate not supported because VM is orphaned") if orphaned?
reason ||= _("Migrate not supported because VM is archived") if archived?
unsupported_reason_add(:retire, reason) if reason
unsupported_reason_add(:migrate, reason) if reason
end
end

Expand Down

0 comments on commit ce672d2

Please sign in to comment.