Actions
Bug #5616
closedDelete of Host fails when Reports are present
Status:
Duplicate
Priority:
High
Assignee:
-
Category:
Host creation
Target version:
-
Description
Hi, we are using foreman 1.4.2 with postgresql DB backend. When trying to delete host that has reports present I get this error:
Warning! ERROR: update or delete on table "hosts" violates foreign key constraint "reports_host_id_fk" on table "reports" DETAIL: Key (id)=(624) is still referenced from table "reports". ... PGError ERROR: update or delete on table "hosts" violates foreign key constraint "reports_host_id_fk" on table "reports" DETAIL: Key (id)=(624) is still referenced from table "reports". app/controllers/hosts_controller.rb:124:in `destroy' app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' lib/middleware/catch_json_parse_errors.rb:9:in `call'
This feature was working before when host didn't recieve any report
Actions