diff --git a/django/contrib/comments/models.py b/django/contrib/comments/models.py index 95aa3ae28a..23b0dfbde6 100644 --- a/django/contrib/comments/models.py +++ b/django/contrib/comments/models.py @@ -56,7 +56,7 @@ class CommentManager(models.Manager): def user_is_moderator(self, user): if user.is_superuser: return True - for g in user.group_set.all(): + for g in user.groups.all(): if g.id == settings.COMMENTS_MODERATORS_GROUP: return True return False