From 34c747ebf74c2b147da4d1aa757db940abb773db Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 26 Jun 2022 13:26:48 +0200 Subject: [PATCH] Appease the dog overlords --- app/models/user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index b246c4a9..5bdd3fc0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -234,9 +234,9 @@ class User < ApplicationRecord end def unban - UserBan.current.where(user_id: self.id).update_all( + bans.current.update( # -1s to account for flakyness with timings in tests - expires_at: DateTime.now - 1.second + expires_at: DateTime.now.utc - 1.second ) end