diff --git a/allauth/account/views.py b/allauth/account/views.py index 6f3e7abb8a..f9785395a1 100644 --- a/allauth/account/views.py +++ b/allauth/account/views.py @@ -411,10 +411,12 @@ def get_context_data(self, **kwargs): { "site": site, "confirmation": self.object, - "can_confirm": self.object.email_address.can_set_verified(), - "email": self.object.email_address.email, + "can_confirm": self.object + and self.object.email_address.can_set_verified(), } ) + if self.object: + ctx["email"] = self.object.email_address.email return ctx def get_redirect_url(self):