소스 검색

Update FixDuplicateProfiles command

Daniel Supernault 2 년 전
부모
커밋
443acb8227
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/Console/Commands/FixDuplicateProfiles.php

+ 2 - 2
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)