Skip to content

Commit

Permalink
🐛 Fixing a bug on existing translation
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancoisbbs committed Jan 23, 2019
1 parent cc58f47 commit 49d50b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Distilleries/Expendable/Scopes/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public function setTranslation($id_element, $model, $id_source, $iso)
->where($this->getQualifiedIsoColumn(), '=', $iso)->get();

if (!$translation->isEmpty()) {
$translation->delete();
$translation->each(function($trans){
$trans->delete();
});
}


Expand Down

0 comments on commit 49d50b4

Please sign in to comment.