diff --git a/app/models/post.rb b/app/models/post.rb index 0441bcb3273..8e03538f527 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -215,7 +215,8 @@ class Post < ActiveRecord::Base end def matches_recent_post? - $redis.get(unique_post_key)&.to_i != id + post_id = $redis.get(unique_post_key) + post_id != (nil) && post_id.to_i != (id) end def raw_hash