Skip to content

Commit 5189753

Browse files
author
Tihomir Banov
committed
Reverse translation null response
1 parent e986d4d commit 5189753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Despark/LaravelDbLocalization/i18nModelTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ public function translate($locale = null)
8989

9090
$translation = null;
9191

92-
if (!isset($this->id)) {
92+
if (isset($this->id)) {
9393
$translation = $translationModel::where($this->translatorField, $this->id)
94-
->where($this->localeField, $locale)->first();
94+
->where($this->localeField, $locale)->first();
9595
}
9696

9797
return $translation;

0 commit comments

Comments
 (0)