From 443acb8227d91608102ab02dd5722b445ec44bac Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Jan 2023 08:33:58 -0700 Subject: [PATCH] Update FixDuplicateProfiles command --- app/Console/Commands/FixDuplicateProfiles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/FixDuplicateProfiles.php b/app/Console/Commands/FixDuplicateProfiles.php index 8a0e3272e..20ee720e1 100644 --- a/app/Console/Commands/FixDuplicateProfiles.php +++ b/app/Console/Commands/FixDuplicateProfiles.php @@ -155,8 +155,8 @@ class FixDuplicateProfiles extends Command protected function checkFollowers($id, $oid) { - Follower::whereProfileId($oid)->update(['profile_id' => $id]); - Follower::whereFollowingId($oid)->update(['following_id' => $id]); + Follower::whereProfileId($oid)->where('profile_id', '!=', $id)->update(['profile_id' => $id]); + Follower::whereFollowingId($oid)->where('following_id', '!=', $id)->update(['following_id' => $id]); } protected function checkHashtagFollow($id, $oid)