Skip to content

Commit

Permalink
Merge pull request #299 from softwaresaved/save-email
Browse files Browse the repository at this point in the history
Save all reviewing emails
  • Loading branch information
rgaiacs authored Mar 22, 2017
2 parents 42c6613 + aa84df0 commit fd20553
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lowfat/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def review_notification(mail, old, new, url):
[mail.receiver.email],
fail_silently=False
)
# Every email is archived in the database
mail.save()

def fund_review_notification(message, sender, old, new):
if new.status in ('A', 'R'):
Expand All @@ -143,9 +145,6 @@ def fund_review_notification(message, sender, old, new):

review_notification(mail, old, new, "/email/template/fund/claimant/change/")

if message:
mail.save()

def expense_review_notification(message, sender, old, new):
if new.status == 'A':
mail = ExpenseSentMail(
Expand All @@ -159,9 +158,6 @@ def expense_review_notification(message, sender, old, new):

review_notification(mail, old, new, "/email/template/expense/claimant/change/")

if message:
mail.save()

def blog_review_notification(message, sender, old, new):
if new.status == 'P':
mail = BlogSentMail(
Expand All @@ -174,6 +170,3 @@ def blog_review_notification(message, sender, old, new):
)

review_notification(mail, old, new, "/email/template/blog/claimant/change/")

if message:
mail.save()

0 comments on commit fd20553

Please sign in to comment.