Skip to content

Commit

Permalink
Don't allow adding another svc bundle into an existing bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Feb 14, 2019
1 parent 962ba0f commit b4fbee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/catalog_controller.rb
Expand Up @@ -1464,7 +1464,7 @@ def rearrange_groups_array

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

0 comments on commit b4fbee4

Please sign in to comment.