Skip to content

Commit

Permalink
OP-264 Merge pull request #487 from oallain/patch-1
Browse files Browse the repository at this point in the history
Fix form error
  • Loading branch information
SzymonKostrubiec authored Apr 18, 2024
2 parents 42c8eaa + 69f50d3 commit 3ff13b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function previewAction(Request $request): Response

$form->handleRequest($request);

if ($form->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
$this->setMediaLocales($media, $request);
$this->setMediaPathIfExists($media);
$mediaTemplate = $this->mediaProviderResolver->resolveProvider($media)->getTemplate();
Expand Down

0 comments on commit 3ff13b1

Please sign in to comment.