Skip to content

Commit

Permalink
Merge pull request #14097 from spencerrlongg/hotfix/migration_model_i…
Browse files Browse the repository at this point in the history
…ssue

Use Query Builder instead of Model for Update to Skip Observer
  • Loading branch information
snipe authored Jan 4, 2024
2 parents 42d3517 + 0d853f9 commit 0c6611d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ public function up()
}
if ($asset->model->eol) {
if ($months != $asset->model->eol) {
$asset->update(['eol_explicit' => true]);
DB::table('assets')->where('id', $asset->id)->update(['eol_explicit' => true]);
}
} else {
$asset->update(['eol_explicit' => true]);
}
// if there is NO model eol, but there is a purchase date and an asset_eol_date (which is what is left over) the asset_eol_date has still been explicitly set
else {
DB::table('assets')->where('id', $asset->id)->update(['eol_explicit' => true]);
}
}
}
Expand Down

0 comments on commit 0c6611d

Please sign in to comment.