FIX: Don't add the reviewable score twice

FIX: Don’t add the reviewable score twice

diff --git a/app/jobs/regular/create_user_reviewable.rb b/app/jobs/regular/create_user_reviewable.rb
index 288ba7f..58ed157 100644
--- a/app/jobs/regular/create_user_reviewable.rb
+++ b/app/jobs/regular/create_user_reviewable.rb
@@ -23,6 +23,8 @@ class Jobs::CreateUserReviewable < Jobs::Base
           email: user.email
         }
       )
+      return if @reviewable.score > 0
+
       @reviewable.add_score(
         Discourse.system_user,
         ReviewableScore.types[:needs_approval],
diff --git a/spec/jobs/create_user_reviewable_spec.rb b/spec/jobs/create_user_reviewable_spec.rb
index a201c5c..c9b54fd 100644
--- a/spec/jobs/create_user_reviewable_spec.rb
+++ b/spec/jobs/create_user_reviewable_spec.rb
@@ -21,6 +21,9 @@ describe Jobs::CreateUserReviewable do
     SiteSetting.must_approve_users = true
     described_class.new.execute(user_id: user.id)
     described_class.new.execute(user_id: user.id)
+
+    reviewable = Reviewable.find_by(target: user)
+    expect(reviewable.reviewable_scores.size).to eq(1)
   end
 
   describe "reasons" do

GitHub sha: 70097966

This commit has been mentioned on Discourse Meta. There might be relevant details there: