mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
BUGFIX Ensure that any relations to MultiFormStep are destroyed before calling delete()
This commit is contained in:
parent
70b7e95c81
commit
ef436eadd4
@ -55,7 +55,8 @@ class MultiFormSession extends DataObject {
|
||||
// delete dependent form steps and relation
|
||||
$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?)
|
||||
$steps->remove($step); // @TODO not sure if this is required (does delete() remove the relation too?)
|
||||
$step->destroy();
|
||||
$step->delete();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user