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"))