From 973ae478b3d26058a0d7b8cde100c4ff9b0d59b4 Mon Sep 17 00:00:00 2001 From: 0x0fbc <10455804+0x0fbc@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:32:55 -0400 Subject: [PATCH] remove redundant expiry check when purging Duo contexts --- src/db/models/two_factor_duo_context.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/db/models/two_factor_duo_context.rs b/src/db/models/two_factor_duo_context.rs index 776c3c0a..3e742d35 100644 --- a/src/db/models/two_factor_duo_context.rs +++ b/src/db/models/two_factor_duo_context.rs @@ -78,9 +78,7 @@ impl TwoFactorDuoContext { pub async fn purge_expired_duo_contexts(conn: &mut DbConn) { for context in Self::find_expired(conn).await { - if context.exp < Utc::now().timestamp() { - context.delete(conn).await.ok(); - } + context.delete(conn).await.ok(); } } }