mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:01:14 +08:00
Remove Ruby warning due to assignment in conditional.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user