File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -683,7 +683,7 @@ private function outputJson(): void
683683 {
684684 switch ($ _POST ['__atkml_action ' ] ?? null ) {
685685 case 'update-row ' :
686- $ entity = $ this ->setDummyModelValue ($ this ->model -> createEntity () );
686+ $ entity = $ this ->createDummyEntityFromPost ($ this ->model );
687687 $ expressionValues = array_merge ($ this ->getExpressionValues ($ entity ), $ this ->getCallbackValues ($ entity ));
688688 $ this ->getApp ()->terminateJson (['success ' => true , 'expressions ' => $ expressionValues ]);
689689 // no break - expression above always terminate
@@ -719,9 +719,9 @@ private function getCallbackValues(Model $entity): array
719719 * Looks inside the POST of the request and loads data into model.
720720 * Allow to Run expression base on post row value.
721721 */
722- private function setDummyModelValue (Model $ entity ): Model
722+ private function createDummyEntityFromPost (Model $ model ): Model
723723 {
724- $ entity = clone $ entity ; // for clearing "required"
724+ $ entity = ( clone $ model )-> createEntity () ; // clone for clearing "required"
725725
726726 foreach ($ this ->fieldDefs as $ def ) {
727727 $ fieldName = $ def ['name ' ];
You can’t perform that action at this time.
0 commit comments