[DATABASE] Remove DATABASE::flush from Profile::setSelfTags
This commit is contained in:
parent
b3bce3efa1
commit
6fc120571d
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user