Skip to content

Commit 979d18d

Browse files
authored
Merge pull request #418 from Tofandel/patch-1
Fix new translation is missing the relation id for saving
2 parents 250f9b3 + a52698e commit 979d18d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Translatable/Translatable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ public function getNewTranslation(string $locale): Model
181181
/** @var Model $translation */
182182
$translation = new $modelName();
183183
$translation->setAttribute($this->getLocaleKey(), $locale);
184+
$translation->setAttribute($this->getTranslationRelationKey(), $this->getKey());
184185
$this->translations->add($translation);
185186

186187
return $translation;

0 commit comments

Comments
 (0)