Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/models/miq_provision_virt_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def allowed_templates(options = {})
end

# Only select the colums we need
vms = vms.select(:id, :name, :guid, :uid_ems, :ems_id)
vms = vms.select(:id, :name, :guid, :uid_ems, :ems_id, :cloud_tenant_id)

allowed_templates_list = source_vm_rbac_filter(vms, condition, VM_OR_TEMPLATE_EXTRA_COLS).to_a
@allowed_templates_filter = filter_id
Expand Down Expand Up @@ -1046,7 +1046,7 @@ def create_hash_struct_from_vm_or_template(vm_or_template, options)
:allocated_disk_storage => vm_or_template.allocated_disk_storage,
:v_total_snapshots => vm_or_template.v_total_snapshots,
:evm_object_class => :Vm}
data_hash[:cloud_tenant] = vm_or_template.cloud_tenant if vm_or_template.respond_to?(:cloud_tenant)
data_hash[:cloud_tenant] = vm_or_template.cloud_tenant if vm_or_template.cloud_tenant_id
if vm_or_template.operating_system
data_hash[:operating_system] = MiqHashStruct.new(:product_name => vm_or_template.operating_system.product_name)
end
Expand Down