BUGFIX Ensure that any relations to MultiFormStep are destroyed before calling delete()

This commit is contained in:
Sean Harvey 2009-01-27 10:47:22 +00:00
parent 70b7e95c81
commit ef436eadd4

View File

@ -56,6 +56,7 @@ class MultiFormSession extends DataObject {
$steps = $this->FormSteps();
if($steps) foreach($steps as $step) {
$steps->remove($step); // @TODO not sure if this is required (does delete() remove the relation too?)
$step->destroy();
$step->delete();
}