Correct logic error resulting in reimbursement claim comments not being sent

This commit is contained in:
Yingtong Li 2020-07-18 16:58:06 +10:00
parent 5bf2f310d6
commit ae128d209c
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -624,8 +624,8 @@ def claim_action(request, claim):
for user in User.objects.filter(groups__name='Treasury'): for user in User.objects.filter(groups__name='Treasury'):
if user != request.user: 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}) 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: if claim.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}) 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 'Submit' in actions:
if not claim.can_submit(request.user): if not claim.can_submit(request.user):