Преглед изворни кода

remove call twice to submit

David Velasco пре 9 година
родитељ
комит
a3b0ce52f7
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      Controller/CRUDController.php

+ 1 - 3
Controller/CRUDController.php

@@ -361,9 +361,7 @@ class CRUDController extends Controller
         $form->setData($object);
         $form->handleRequest($request);
 
-        if ($this->getRestMethod() == 'POST') {
-            $form->submit($request);
-
+        if ($request->isMethod('POST')) {
             $isFormValid = $form->isValid();
 
             // persist if the form was valid and if in preview mode the preview was approved