diff --git a/chat_box/models.py b/chat_box/models.py index 5958347..1a62171 100644 --- a/chat_box/models.py +++ b/chat_box/models.py @@ -58,8 +58,8 @@ class Ignore(models.Model): @classmethod def get_ignored_users(self, user): try: - return self.objects.get(user=user).ignored_users.all() - except Ignore.DoesNotExist: + return self.objects.filter(user=user)[0].ignored_users.all() + except: return Profile.objects.none() @classmethod diff --git a/judge/models/problem.py b/judge/models/problem.py index 1d6fc0e..a4ee885 100644 --- a/judge/models/problem.py +++ b/judge/models/problem.py @@ -406,6 +406,7 @@ class Problem(models.Model): ('change_public_visibility', 'Change is_public field'), ('change_manually_managed', 'Change is_manually_managed field'), ('see_organization_problem', 'See organization-private problems'), + ('suggest_problem_changes', 'Suggest changes to problem'), ) verbose_name = _('problem') verbose_name_plural = _('problems')