Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed condition to get list of available resources.
Browse files Browse the repository at this point in the history
h-kataria committed Mar 14, 2017
1 parent 8b7d2f2 commit d3e223b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
@@ -1422,7 +1422,7 @@ def rearrange_groups_array

def get_available_resources(kls)
@edit[:new][:available_resources] = {}
kls.constantize.all.reject { |st| st.type == "ServiceTemplateAnsiblePlaybook" }.each do |r|
kls.constantize.where("type is null or type != 'ServiceTemplateAnsiblePlaybook'").each do |r|
@edit[:new][:available_resources][r.id] = r.name if r.id.to_s != @edit[:rec_id].to_s &&
!@edit[:new][:selected_resources].include?(r.id) # don't add the servicetemplate record that's being edited, or add all vm templates
end

0 comments on commit d3e223b

Please sign in to comment.