Skip to content

Commit

Permalink
Fix when not entering all translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Bozhidar Hristov committed Dec 22, 2016
1 parent f335e11 commit b8886a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Form/EventListener/TranslationsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function submit(FormEvent $event)
// Remove useless Translation object
if (!$translation) {
$Translatable->getTranslations()->removeElement($translation);
unset($data[$locale]);
} else {
$LanguageField = $this->TranslationService->getLanguageField(get_class($translation));
$TranslatableField = $this->TranslationService->getTranslatableField(get_class($translation));
Expand Down

0 comments on commit b8886a8

Please sign in to comment.