#3275 - locations#destroy (ActiveRecord::InvalidForeignKey) "PG::ForeignKeyViolation:

An ActiveRecord::InvalidForeignKey occurred in locations#destroy:

 PG::ForeignKeyViolation: ERROR:  update or delete on table "vendors" violates foreign key constraint "fk_rails_79fc793b0b" on table "card_ownerships"
DETAIL:  Key (id)=(73) is still referenced from table "card_ownerships".

 app/controllers/locations_controller.rb:61:in `destroy'


-------------------------------
Request:
-------------------------------

 * URL        : https://www.bikelink.org/locations/566
 * HTTP Method: DELETE
 * IP address : 98.35.154.160
 * Parameters : {"_method"=>"delete", "authenticity_token"=>"NONfXp768dJsTbMEXiK2yy+T7Yf6AWbnrdaqB2oMwMV0RyqseM/XcOwUrODhEMscwPr+9zysnGuVHPOkhkEVRg==", "controller"=>"locations", "action"=>"destroy", "id"=>"566"}
 * Timestamp  : 2022-12-20 20:47:46 UTC
 * Server : www-6.internal.bikelink.org
   * Rails root : /var/www/bikelink
 * Process: 22704

-------------------------------
Session:
-------------------------------

 * session id: [FILTERED]
 * data: {"session_id"=>"25357ab67c93176d19dfd5135bb2335e",
  "warden.user.person.key"=>[[31069], "aS4D8gZPuz3F2YRuq8Wc"],
  "_csrf_token"=>"LNXYYlxA9AoZi2A5Slv2tId8kz+gx0DMtHYFL09Ayqw=",
  "params_for_filter"=>
   {"filter_by_location"=>"5th and Mission Garage Ticket Window",
    "filter_by_owner"=>"",
    "filter_by_state"=>"",
    "filter_by_priority"=>""}}

-------------------------------
Backtrace:
-------------------------------

 app/controllers/locations_controller.rb:61:in `destroy'
 app/controllers/application_controller.rb:44:in `process_action'
Znovu načítať