Skip to content

Commit 2293dc0

Browse files
imbarbudimanparadoxxxzero
authored andcommitted
[FIX][16.0] auth_partner: check if auth_partner.exists()
browse() will return a pseudo-record. Use browse().exists() to ensure the record exists.
1 parent 5887934 commit 2293dc0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

auth_partner/models/auth_directory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def _decode_token(
199199

200200
if (
201201
obj["action"] != action
202-
or not auth_partner
202+
or not auth_partner.exists()
203203
or auth_partner.directory_id != self
204204
):
205205
raise UserError(self.env._("Invalid token"))

0 commit comments

Comments
 (0)