Project

General

Profile

« Previous | Next » 

Revision 160e24ea

Added by Joseph Magen almost 10 years ago

fixes #6430 - validate presence of location and organization for managed host if Settings are turned on

View differences:

app/models/host/managed.rb
alias_attribute :os, :operatingsystem
alias_attribute :arch, :architecture
validates :environment_id, :presence => true
validates :environment_id, :presence => true
validates :organization_id, :presence => true, :if => Proc.new {|host| host.managed? && SETTINGS[:organizations_enabled] }
validates :location_id, :presence => true, :if => Proc.new {|host| host.managed? && SETTINGS[:locations_enabled] }
if SETTINGS[:unattended]
# handles all orchestration of smart proxies.

Also available in: Unified diff