fosterful / scheduler

Scheduling app
http://app.fosterful.org
MIT License
26 stars 15 forks source link

Error deleting need with shift survey present #851

Open benjaminwood opened 2 years ago

benjaminwood commented 2 years ago
[Fosterful Scheduler/production] ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR:  update or delete on table "needs" violates foreign key constraint "fk_rails_cf04de6280" on table "shift_surveys"DETAIL:  Key (id)=(1836) is still referenced from table "shift_surveys".

Backtrace

line 74 of [PROJECT_ROOT]/app/controllers/needs_controller.rb: destroy
line 63 of [PROJECT_ROOT]/app/controllers/application_controller.rb: set_time_zone

View full backtrace and more info at honeybadger.io

benjaminwood commented 2 years ago

We need to determine what the desired behavior is here. Should we allow deleting a need at this stage?