Skip to content

Commit 389d76b

Browse files
committed
fix for vsch#138
1 parent bb283ba commit 389d76b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Manager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ function firstOrNewTranslation($attributes = null)
289289
$query = $this->translation->on($this->getConnectionName());
290290

291291
foreach ($attributes as $attribute => $value) {
292-
$query = $query->where($attribute, $value);
292+
if ($attribute === 'locale' || $attribute === 'group' || $attribute === 'key') {
293+
$query = $query->where($attribute, $value);
294+
}
293295
}
294296

295297
$translation = $query->first();

versioninfo.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
The 1.x.x versions are for Laravel 4.2, 2.1.x versions are for Laravel 5.1+, 2.3.x for Laravel
44
5.3, 2.4.x for Laravel 5.4, 2.5.x for Laravel 5.5 and 2.6.x for Laravel 5.6 compatibility.
55

6+
#### 2.6.46
7+
8+
* Fix: #138, translations:find -> Integrity constraint violation: 1062 Duplicate entry
9+
610
#### 2.6.44
711

812
* Fix: missed hard coded `ltm_translations` in `PostgresTranslatorRepository`

0 commit comments

Comments
 (0)