diff --git a/lib/Alchemy/Phrasea/Command/Thesaurus/Translator/Job.php b/lib/Alchemy/Phrasea/Command/Thesaurus/Translator/Job.php
index fcd5d21ebd..e8d408d057 100644
--- a/lib/Alchemy/Phrasea/Command/Thesaurus/Translator/Job.php
+++ b/lib/Alchemy/Phrasea/Command/Thesaurus/Translator/Job.php
@@ -480,16 +480,17 @@ private function doRecord($record_id, $metas)
}
}
- $jsActions = json_encode($actions, JSON_PRETTY_PRINT);
- if($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
- $this->output->writeln(sprintf("JS : %s", $jsActions));
- }
-
- if (!$this->globalConfiguration->isDryRun()) {
- $record = $this->getDatabox()->getRecordRepository()->find($record_id);
- $record->setMetadatasByActions(json_decode($jsActions));
+ if(count($actions) > 0) {
+ $jsActions = json_encode($actions, JSON_PRETTY_PRINT);
+ if($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
+ $this->output->writeln(sprintf("JS : %s", $jsActions));
+ }
+
+ if (!$this->globalConfiguration->isDryRun()) {
+ $record = $this->getDatabox()->getRecordRepository()->find($record_id);
+ $record->setMetadatasByActions(json_decode($jsActions));
+ }
}
-
$this->recordsDone++;
}