diff -r 5c708d546d02dedc94265a9b4661e1889b459544 -r 791947e132cd5586593ba7dab5bb0654f5fac50d indefero/src/IDF/Form/Admin/ProjectDelete.php --- a/indefero/src/IDF/Form/Admin/ProjectDelete.php Sun Aug 11 15:05:46 2013 -0500 +++ b/indefero/src/IDF/Form/Admin/ProjectDelete.php Sun Aug 11 17:15:05 2013 -0500 @@ -80,6 +80,10 @@ // So, we drop the project, it will cascade and delete all the // elements of the project. For large projects, this may use // quite some memory. + + // This is to fix a FK constraint + $this->project->current_activity = null; + $this->project->update(); $this->project->delete(); return true; }