#3469 - An ActiveRecord::InvalidForeignKey occurred in trouble_tickets#destroy
An ActiveRecord::InvalidForeignKey occurred in trouble_tickets#destroy:
PG::ForeignKeyViolation: ERROR: update or delete on table "trouble_tickets" violates foreign key constraint "fk_rails_a0529ead60" on table "error_messages"
DETAIL: Key (id)=(19057) is still referenced from table "error_messages".
app/controllers/trouble_tickets_controller.rb:27:in `destroy'
-------------------------------
Request:
-------------------------------
* URL : https://www.bikelink.org/trouble_tickets/19057
* HTTP Method: DELETE
* IP address : 23.93.179.255
* Parameters : {"_method"=>"delete", "authenticity_token"=>"ciurV2CND1NgriiXUCvor0gEOZ37qIgrN6zUwsdeqYqBT+s/EKvxvBadnXkCTK3mVuegQeoJCrdYMvF2sx/dtw==", "controller"=>"trouble_tickets", "action"=>"destroy", "id"=>"19057"}
* Timestamp : 2023-08-25 18:41:49 UTC
* Server : www-6.internal.bikelink.org
* Rails root : /var/www/bikelink
* Process: 7629
-------------------------------
Session:
-------------------------------
* session id: [FILTERED]
* data: {"session_id"=>"532e84a2483b46c1f9652279eb486636",
"warden.user.person.key"=>[[24632], "RZ23Y_6AEFen-GzyrzFn"],
"_csrf_token"=>"2/Gm71UT4sFBMrWodurkhibEnZ9b1LF3awBydiG0y7Q=",
"params_for_filter"=>
{"filter_by_location"=>nil,
"filter_by_owner"=>nil,
"filter_by_state"=>2,
"filter_by_priority"=>nil}}
-------------------------------
Backtrace:
-------------------------------
app/controllers/trouble_tickets_controller.rb:27:in `destroy'
app/controllers/application_controller.rb:44:in `process_action'
Znovu načíst