Don't notify everyone when a proposal changes, only the admins
This commit is contained in:
parent
2aa0074bdc
commit
42372791d5
1 changed files with 8 additions and 4 deletions
|
@ -205,10 +205,14 @@ def proposal_edit(request, pk):
|
|||
if form.is_valid():
|
||||
form.save()
|
||||
if hasattr(proposal, "reviews"):
|
||||
users = User.objects.filter(
|
||||
Q(review__proposal=proposal) |
|
||||
Q(proposalmessage__proposal=proposal)
|
||||
)
|
||||
# Miniconf updates should only email the admins
|
||||
if proposal.kind.slug == 'miniconf':
|
||||
users = User.objects.filter(username__in=settings.ADMIN_USERNAMES)
|
||||
else:
|
||||
users = User.objects.filter(
|
||||
Q(review__proposal=proposal) |
|
||||
Q(proposalmessage__proposal=proposal)
|
||||
)
|
||||
users = users.exclude(id=request.user.id).distinct()
|
||||
for user in users:
|
||||
ctx = {
|
||||
|
|
Loading…
Reference in a new issue