Skip to content

Commit

Permalink
fix for #138
Browse files Browse the repository at this point in the history
  • Loading branch information
vsch committed Oct 22, 2018
1 parent bb283ba commit 389d76b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ function firstOrNewTranslation($attributes = null)
$query = $this->translation->on($this->getConnectionName());

foreach ($attributes as $attribute => $value) {
$query = $query->where($attribute, $value);
if ($attribute === 'locale' || $attribute === 'group' || $attribute === 'key') {
$query = $query->where($attribute, $value);
}
}

$translation = $query->first();
Expand Down
4 changes: 4 additions & 0 deletions versioninfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
The 1.x.x versions are for Laravel 4.2, 2.1.x versions are for Laravel 5.1+, 2.3.x for Laravel
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.

#### 2.6.46

* Fix: #138, translations:find -> Integrity constraint violation: 1062 Duplicate entry

#### 2.6.44

* Fix: missed hard coded `ltm_translations` in `PostgresTranslatorRepository`
Expand Down

0 comments on commit 389d76b

Please sign in to comment.