Skip to content

Commit 6bce00b

Browse files
kottkrigJohan Larsson
andauthored
Cancel article timestampable when updating mediaUpdatedAt (#1217)
Co-authored-by: Johan Larsson <[email protected]>
1 parent a0db65e commit 6bce00b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SWP/Bundle/CoreBundle/MessageHandler/ImageConversionHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ private function markArticlesMediaAsUpdated($image)
134134
/** @var ImageRenditionInterface[] $articleMedia */
135135
$articleMedia = $this->imageRenditionRepository->findBy(['image' => $image]);
136136
foreach ($articleMedia as $media) {
137-
$media->getMedia()->getArticle()->setMediaUpdatedAt(new DateTime());
137+
$article = $media->getMedia()->getArticle();
138+
$article->setMediaUpdatedAt(new DateTime());
139+
$article->cancelTimestampable(true);
138140
}
139141
}
140142

0 commit comments

Comments
 (0)