From 69a26aa8f2b148b9a6e1b5dab9c3307c6e1bc107 Mon Sep 17 00:00:00 2001 From: Kanstantsin Date: Thu, 4 Oct 2018 17:35:30 +0300 Subject: [PATCH] Commit deferred bindings on model created with RelationController (#3843) Fixes #3829. Credit to @iotch. Tested by the fantastic Octodock provided by @petehalverson --- modules/backend/behaviors/RelationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index aa09da3d7..d53fbed96 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -1032,7 +1032,7 @@ class RelationController extends ControllerBehavior * Has one relations will save as part of the add() call. */ if ($this->deferredBinding || $this->relationType != 'hasOne') { - $newModel->save(); + $newModel->save(null, $this->manageWidget->getSessionKey()); } $this->relationObject->add($newModel, $sessionKey);