diff --git a/src/Entity/Profile.php b/src/Entity/Profile.php index d498780e29..2a2f40e764 100644 --- a/src/Entity/Profile.php +++ b/src/Entity/Profile.php @@ -236,7 +236,7 @@ class Profile return DB::findBy('profile_tag', ['tagger' => $this->id, 'tagged' => $this->id]); } - public function setSelfTags(array $tags, array $pt_existing, bool $flush = true): void + public function setSelfTags(array $tags, array $pt_existing): void { $tag_existing = F\map($pt_existing, function ($pt) { return $pt->getTag(); }); $tag_to_add = array_diff($tags, $tag_existing); @@ -249,8 +249,5 @@ class Profile foreach ($pt_to_remove as $pt) { DB::remove($pt); } - if ($flush) { - DB::flush(); - } } }