Actions
Bug #26937
openFailure to remove parent location (with nested one) is not correctly reported
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
When trying to remove a location that has a nested Location, the following log is produced:
[I|app|bebaa53c] Started DELETE "/api/locations/27" for 192.168.121.1 at 2019-06-03 12:06:09 +0000
[I|app|bebaa53c] Processing by Api::V2::LocationsController#destroy as JSON
[I|app|bebaa53c] Parameters: {"apiv"=>"v2", "id"=>"27"}
[I|app|bebaa53c] Current user set to admin (admin)
[D|app|bebaa53c] Current location set to none
[D|app|bebaa53c] Current organization set to none
[I|aud|bebaa53c] Location (27) destroy event on name Test Location
[I|aud|bebaa53c] Location (27) destroy event on ignore_types ["ProvisioningTemplate", "Hostgroup"]
[I|aud|bebaa53c] Location (27) destroy event on description
[I|aud|bebaa53c] Location (27) destroy event on label
[I|aud|bebaa53c] Location (27) destroy event on ancestry
[I|aud|bebaa53c] Location (27) destroy event on manifest_refreshed_at
[D|app|bebaa53c] Body: {"error":{"message":"Cannot delete Test Location because it has nested location."}}
[I|app|bebaa53c] Completed 200 OK in 57ms (Views: 0.2ms | ActiveRecord: 14.6ms)
The strange thing is that it errors, but still returns 200 OK.
Actions