Charcoal-SE / metasmoke

Web dashboard for SmokeDetector.
https://metasmoke.erwaysoftware.com
Creative Commons Zero v1.0 Universal
43 stars 34 forks source link

Cannot cancel account #222

Closed JinEnMok closed 7 years ago

JinEnMok commented 7 years ago

Tried to cancel account today - got an error, something about

ActiveRecord::StatementInvalid in Devise::RegistrationsController#destroy

and

Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails (`metasmoke`.`flag_conditions`, CONSTRAINT `fk_rails_4296ce72f4` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)): DELETE FROM `users` WHERE `users`.`id` = 301

See the attached error page (originally HTML but extension changed to TXT because GitHub): Action Controller_ Exception caught.txt

ArtOfCode- commented 7 years ago

For conditions, we can destroy dependants. We should check that we're nullifying not deleting for flag logs, though.