Skip to content

Commit

Permalink
Prevent timestamp update when pivot is not dirty (#32311)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Apr 9, 2020
1 parent 0347c51 commit 5484301
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ protected function updateExistingPivotUsingCustomClass($id, array $attributes, $
$this->relatedPivotKey => $this->parseId($id),
], true);

$pivot->timestamps = in_array($this->updatedAt(), $this->pivotColumns);
$pivot->timestamps = $updated && in_array($this->updatedAt(), $this->pivotColumns);

$pivot->fill($attributes)->save();

Expand Down

0 comments on commit 5484301

Please sign in to comment.