Remove Ruby warning due to assignment in conditional.

This commit is contained in:
Guo Xiang Tan 2018-12-17 13:08:12 +08:00
parent ed1a309fe4
commit 704a122656
1 changed files with 4 additions and 1 deletions

View File

@ -358,7 +358,10 @@ module Discourse
end
def self.recently_readonly?
return false unless read_only = last_read_only[$redis.namespace]
if (read_only = last_read_only[$redis.namespace]).blank?
return false
end
read_only > 15.seconds.ago
end