From 6ef6cd6917775d15e2c23d6995f0aa6594b25046 Mon Sep 17 00:00:00 2001 From: Imbar Budiman Date: Thu, 25 Sep 2025 12:08:16 +0700 Subject: [PATCH] [FIX][16.0] auth_partner: check if auth_partner.exists() browse() will return a pseudo-record. Use browse().exists() to ensure the record exists. --- auth_partner/models/auth_directory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_partner/models/auth_directory.py b/auth_partner/models/auth_directory.py index fe2663640..fc0987874 100644 --- a/auth_partner/models/auth_directory.py +++ b/auth_partner/models/auth_directory.py @@ -197,7 +197,7 @@ def _decode_token( if ( obj["action"] != action - or not auth_partner + or not auth_partner.exists() or auth_partner.directory_id != self ): raise UserError(_("Invalid token"))