From 8cd703d68b1b9e5949a1e00c1a495be095ef571f Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Fri, 24 Dec 2021 00:37:38 +0000 Subject: [PATCH] [COMPONENT][Link] Even if everything else in Posting fails, no reason to discard the finding about the Link --- components/Link/Entity/Link.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Link/Entity/Link.php b/components/Link/Entity/Link.php index 2a6ac19d4c..812bc7a840 100644 --- a/components/Link/Entity/Link.php +++ b/components/Link/Entity/Link.php @@ -163,7 +163,7 @@ class Link extends Entity 'url_hash' => $url_hash, 'mimetype' => $headers['content-type'][0] ?? null, ]); - DB::persist($link); + DB::wrapInTransaction(fn () => DB::persist($link)); Event::handle('LinkStoredNew', [&$link]); return $link; }