about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-01 19:57:09 +0200
committerGitHub <noreply@github.com>2019-08-01 19:57:09 +0200
commit29609c09f4f6e50ebba60c8472e015c16275a4d2 (patch)
treea4f505560145b7387b92703587b656082015ecd7 /app/models
parent2dee293c4c98486d387105224023fad02b8b0d96 (diff)
Fix tag score not being updated when the tag is trending (#11465)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/trending_tags.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/trending_tags.rb b/app/models/trending_tags.rb
index 34a4abbc5..211c8f1dc 100644
--- a/app/models/trending_tags.rb
+++ b/app/models/trending_tags.rb
@@ -49,7 +49,7 @@ class TrendingTags
       else
         score = ((observed - expected)**2) / expected
         added = redis.zadd(key, score, tag_id.to_s)
-        bump_tag_score!(tag_id) if added == 1
+        bump_tag_score!(tag_id) if added
       end
 
       redis.expire(key, EXPIRE_TRENDS_AFTER)