Skip to content

Commit

Permalink
Fixed delete when a configuration provider is selected from the tree
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Aug 15, 2016
1 parent 7a5f648 commit cff4530
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/provider_foreman_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def edit
def delete
assert_privileges("provider_foreman_delete_provider") # TODO: Privelege name should match generic ways from Infra and Cloud
checked_items = find_checked_items # TODO: Checked items are managers, not providers. Make them providers
checked_items.push(params[:id]) if checked_items.empty? && params[:id]
providers = ManageIQ::Providers::ConfigurationManager.where(:id => checked_items).includes(:provider).collect(&:provider)
if providers.empty?
add_flash(_("No %{model} were selected for %{task}") % {:model => ui_lookup(:tables => "providers"), :task => "deletion"}, :error)
Expand Down

0 comments on commit cff4530

Please sign in to comment.