浏览代码

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)