Follow up to 704a122656e762fbd43427e3169d6dce87857d23.

Follow up to 704a122656e762fbd43427e3169d6dce87857d23.
diff --git a/lib/discourse.rb b/lib/discourse.rb
index 9ea8ef9..21a3e33 100644
--- a/lib/discourse.rb
+++ b/lib/discourse.rb
@@ -358,11 +358,8 @@ module Discourse
   end
 
   def self.recently_readonly?
-    if (read_only = last_read_only[$redis.namespace]).blank?
-      return false
-    end
-
-    read_only > 15.seconds.ago
+    read_only = last_read_only[$redis.namespace]
+    read_only.present? && read_only > 15.seconds.ago
   end
 
   def self.received_readonly!

GitHub
sha: 9e795b9d

1 Like