]> git.openstreetmap.org Git - rails.git/commitdiff
Actually use user_block
authorSimon Poole <simon@poole.ch>
Sat, 18 Feb 2017 15:17:46 +0000 (16:17 +0100)
committerSimon Poole <simon@poole.ch>
Sat, 18 Feb 2017 15:17:46 +0000 (16:17 +0100)
app/controllers/application_controller.rb

index 8a27a2fef2ff7d3041c0ce2f834e192dea052ed7..d6516dc145b03679695ce146d70f97713b3df955 100644 (file)
@@ -155,7 +155,7 @@ class ApplicationController < ActionController::Base
       user_block =  @user.blocks.active.take
       unless user_block.nil? 
         set_locale
-        if  @user.blocks.active.take.zero_hour?
+        if  user_block.zero_hour?
           report_error  t("application.setup_user_auth.blocked_zero_hour"), :forbidden
         else
           report_error t("application.setup_user_auth.blocked"), :forbidden