Revision 656ecec5
Added by Dominic Cleal about 9 years ago
app/models/compute_resource.rb | ||
---|---|---|
Host.authorized(:view_hosts, Host).joins(:primary_interface).
|
||
where(:nics => {:primary => true}).
|
||
where("nics.#{name}" => attributes).
|
||
readonly(false).
|
||
first
|
||
end
|
||
|
Also available in: Unified diff
fixes #9778 - return r/w host when finding and associating to CRs
(cherry picked from commit cd4c4ad907fdadae66576f64831204711748bef3)