Project

General

Profile

« Previous | Next » 

Revision 8c68024a

Added by Daniel Lobato Garcia over 10 years ago

fixes #2231 - hostgroup deletion is restricted to hostgroups without children

View differences:

app/controllers/hostgroups_controller.rb
end
def destroy
if @hostgroup.destroy
process_success
else
load_vars_for_ajax
begin
if @hostgroup.destroy
process_success
else
load_vars_for_ajax
process_error
end
rescue Ancestry::AncestryException
flash[:error] = _("Cannot delete group %{current} because it has nested groups.") % { :current => @hostgroup.label }
process_error
end
end

Also available in: Unified diff