소스 검색

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