diff --git a/zds/member/views/profile.py b/zds/member/views/profile.py index 960b3323e9..5c8e3f50c8 100644 --- a/zds/member/views/profile.py +++ b/zds/member/views/profile.py @@ -199,7 +199,7 @@ def get_context_data(self, **kwargs): context["alerts"] = profile.alerts_on_this_profile.all().order_by("-pubdate") context["has_unsolved_alerts"] = profile.alerts_on_this_profile.filter(solved=False).exists() has_ban_provider_perm = self.request.user.has_perm("user.change_bannedemailprovider") - new_provider = NewEmailProvider.objects.where(user=usr).first() + new_provider = NewEmailProvider.objects.filter(user=usr).first() context["can_ban_provider"] = has_ban_provider_perm and new_provider is not None context["provider"] = new_provider context["summaries"] = self.get_summaries(profile, hide_forum_activity)