Skip to content

Commit a52698e

Browse files
authored
Update Translatable.php
1 parent 9b5c370 commit a52698e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Translatable/Translatable.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ public function getNewTranslation(string $locale): Model
181181
/** @var Model $translation */
182182
$translation = new $modelName();
183183
$translation->setAttribute($this->getLocaleKey(), $locale);
184-
$relation = $this->translations();
185-
$translation->setAttribute($relation->getForeignKeyName(), $relation->getParentKey());
184+
$translation->setAttribute($this->getTranslationRelationKey(), $this->getKey());
186185
$this->translations->add($translation);
187186

188187
return $translation;

0 commit comments

Comments
 (0)