From: Simon Poole Date: Sat, 18 Feb 2017 16:05:36 +0000 (+0100) Subject: Make test for a "zero hour" block more robust X-Git-Tag: live~4550^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/7f05783949ce561d58904da133efd37438ebffe8 Make test for a "zero hour" block more robust --- diff --git a/app/models/user_block.rb b/app/models/user_block.rb index edea23c80..eb0daba65 100644 --- a/app/models/user_block.rb +++ b/app/models/user_block.rb @@ -29,7 +29,8 @@ class UserBlock < ActiveRecord::Base ## # returns true if the block is a "zero hour" block def zero_hour? - needs_view && (ends_at.to_i == updated_at.to_i) + # if the times differ more than 1 minute we probably have more important issues + needs_view && (ends_at.to_i - updated_at.to_i) < 60 end ##