Fixing an issue with project activity FK constraints when deleting a project.

master
Nathan Adams 2013-08-11 17:15:05 -05:00
parent a7e1392f53
commit 5940f965a6
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ class IDF_Form_Admin_ProjectDelete extends Pluf_Form
// 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;
}