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

This commit is contained in:
Nathan Adams 2013-08-11 17:15:05 -05:00
parent a7e1392f53
commit 5940f965a6

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 // So, we drop the project, it will cascade and delete all the
// elements of the project. For large projects, this may use // elements of the project. For large projects, this may use
// quite some memory. // quite some memory.
// This is to fix a FK constraint
$this->project->current_activity = null;
$this->project->update();
$this->project->delete(); $this->project->delete();
return true; return true;
} }