Преглед на файлове

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->setData($object);
         $form->handleRequest($request);
         $form->handleRequest($request);
 
 
-        if ($this->getRestMethod() == 'POST') {
-            $form->submit($request);
-
+        if ($request->isMethod('POST')) {
             $isFormValid = $form->isValid();
             $isFormValid = $form->isValid();
 
 
             // persist if the form was valid and if in preview mode the preview was approved
             // persist if the form was valid and if in preview mode the preview was approved