From e172f3ed6cae59017daa88f7ec4e5544a7b51500 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Fri, 27 Sep 2024 16:49:23 +0200 Subject: [PATCH] [#10799] Fix tests --- app/models/api_entreprise_token.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/api_entreprise_token.rb b/app/models/api_entreprise_token.rb index fac81acda..b3c1e5b7b 100644 --- a/app/models/api_entreprise_token.rb +++ b/app/models/api_entreprise_token.rb @@ -18,7 +18,7 @@ class APIEntrepriseToken end def expiration - Time.zone.at(decoded_token["exp"]) + decoded_token.key?("exp") && Time.zone.at(decoded_token["exp"]) end def role?(role)