not delete project

Added by Ivan Isakov 4 months ago

Hi,
I can't to delete project from Administration/Projects panel.
Get next error:

App 28310 output: Started DELETE "/projects/kanban" for my_ip_address at 2019-07-16 16:46:36 +0300
App 28310 output: Processing by ProjectsController#destroy as HTML
App 28310 output: Parameters: {"authenticity_token"=>"sB6GyFPkmpCYtAeNMRsSfgWMWZpLMUjf2DrJjfwxQJQFxUTMgTaZtnJ1/Fa5DfmFNCXk1NZUiv0t+Kug4sfgaw==", "id"=>"kanban"}
App 28310 output: Current user: admin (id=1)
App 28310 output: Rendering projects/destroy.html.erb within layouts/base
App 28310 output: Rendered projects/destroy.html.erb within layouts/base (1.4ms)
App 28310 output: Completed 200 OK in 166ms (Views: 12.0ms | ActiveRecord: 149.4ms)
App 28310 output: Started DELETE "/projects/kanban" for my_ip_address at 2019-07-16 16:46:38 +0300
App 28310 output: Processing by ProjectsController#destroy as HTML
App 28310 output: Parameters: {"utf8"=>"✓", "authenticity_token"=>"pwW5U+dk95qTrvsVw+qslnIDsc6F4ffY485wu2NnY2AS3ntXNbb0vHlvAM5L/EdtQ6oMgBiENfoWDBKWfZHDnw==", "confirm"=>"1", "commit"=>"Удалить", "id"=>"kanban"}
App 28310 output: Current user: admin (id=1)
App 28310 output: Completed 500 Internal Server Error in 80ms (ActiveRecord: 52.0ms)
App 28310 output:
App 28310 output: ActiveRecord::InvalidForeignKey (PG::ForeignKeyViolation: ERROR: update or delete on table "issues" violates foreign key constraint "fk_rails_d346a13856" on table "redhopper_issues"
App 28310 output: DETAIL: Key (id)=(3) is still referenced from table "redhopper_issues".
App 28310 output: : DELETE FROM "issues" WHERE "issues"."id" = $1 AND "issues"."lock_version" = $2):
App 28310 output:
App 28310 output: app/models/issue.rb:223:in `destroy'
App 28310 output: app/controllers/projects_controller.rb:234:in `destroy'
App 28310 output: lib/redmine/sudo_mode.rb:63:in `sudo_mode'