From ae128d209c9e9e40aab7fb95f4e11f2ef0f917c8 Mon Sep 17 00:00:00 2001 From: Yingtong Li Date: Sat, 18 Jul 2020 16:58:06 +1000 Subject: [PATCH] Correct logic error resulting in reimbursement claim comments not being sent --- sstreasury/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sstreasury/views.py b/sstreasury/views.py index 2c993bf..24d49a2 100644 --- a/sstreasury/views.py +++ b/sstreasury/views.py @@ -624,8 +624,8 @@ def claim_action(request, claim): for user in User.objects.filter(groups__name='Treasury'): if user != request.user: emailer.send_mail([user.email], 'New comment on reimbursement claim: {} (RE-{})'.format(claim.purpose, claim.id), 'sstreasury/email/claim_commented.md', {'claim': claim, 'comment': comment}) - if comment.author != request.user: - emailer.send_mail([comment.author], 'New comment on reimbursement claim: {} (RE-{})'.format(revision.name, claim.id), 'sstreasury/email/claim_commented.md', {'claim': claim, 'comment': comment}) + if claim.author != request.user: + emailer.send_mail([claim.author.email], 'New comment on reimbursement claim: {} (RE-{})'.format(claim.purpose, claim.id), 'sstreasury/email/claim_commented.md', {'claim': claim, 'comment': comment}) if 'Submit' in actions: if not claim.can_submit(request.user):