Fix race in chat ignore
This commit is contained in:
parent
1dfc6d312d
commit
e51129d36f
2 changed files with 3 additions and 2 deletions
|
@ -58,8 +58,8 @@ class Ignore(models.Model):
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_ignored_users(self, user):
|
def get_ignored_users(self, user):
|
||||||
try:
|
try:
|
||||||
return self.objects.get(user=user).ignored_users.all()
|
return self.objects.filter(user=user)[0].ignored_users.all()
|
||||||
except Ignore.DoesNotExist:
|
except:
|
||||||
return Profile.objects.none()
|
return Profile.objects.none()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -406,6 +406,7 @@ class Problem(models.Model):
|
||||||
('change_public_visibility', 'Change is_public field'),
|
('change_public_visibility', 'Change is_public field'),
|
||||||
('change_manually_managed', 'Change is_manually_managed field'),
|
('change_manually_managed', 'Change is_manually_managed field'),
|
||||||
('see_organization_problem', 'See organization-private problems'),
|
('see_organization_problem', 'See organization-private problems'),
|
||||||
|
('suggest_problem_changes', 'Suggest changes to problem'),
|
||||||
)
|
)
|
||||||
verbose_name = _('problem')
|
verbose_name = _('problem')
|
||||||
verbose_name_plural = _('problems')
|
verbose_name_plural = _('problems')
|
||||||
|
|
Loading…
Reference in a new issue