]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/DeveloperController.php
Fix tests & deprecation notice
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / DeveloperController.php
index 550c06087cd6329f7901709f6f21bef6adef8395..9cb1b626456884cd615ecb4178e0371b6dbdd330 100644 (file)
@@ -42,7 +42,7 @@ class DeveloperController extends Controller
         $clientForm = $this->createForm(ClientType::class, $client);
         $clientForm->handleRequest($request);
 
-        if ($clientForm->isValid()) {
+        if ($clientForm->isSubmitted() && $clientForm->isValid()) {
             $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']);
             $em->persist($client);
             $em->flush();