From 0592937264d7a8cb4f1ea56be403f48e0801b2b7 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 8 Feb 2023 04:39:57 -0500 Subject: Apply Rubocop Rails/WhereNot (#23448) * Apply Rubocop Rails/WhereNot * Update spec for where.not --- app/lib/vacuum/access_tokens_vacuum.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/lib') diff --git a/app/lib/vacuum/access_tokens_vacuum.rb b/app/lib/vacuum/access_tokens_vacuum.rb index 4f3878027..7b91f74a5 100644 --- a/app/lib/vacuum/access_tokens_vacuum.rb +++ b/app/lib/vacuum/access_tokens_vacuum.rb @@ -9,10 +9,10 @@ class Vacuum::AccessTokensVacuum private def vacuum_revoked_access_tokens! - Doorkeeper::AccessToken.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all + Doorkeeper::AccessToken.where.not(revoked_at: nil).where('revoked_at < NOW()').delete_all end def vacuum_revoked_access_grants! - Doorkeeper::AccessGrant.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all + Doorkeeper::AccessGrant.where.not(revoked_at: nil).where('revoked_at < NOW()').delete_all end end -- cgit