Skip to content

Commit

Permalink
fixed create_email not occurring with subscribers
Browse files Browse the repository at this point in the history
  • Loading branch information
aot221 committed Jun 10, 2016
1 parent 346ac8f commit 73f3f70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public_records_portal/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ def generate_prr_emails(
elif recipient_type == 'Subscribers':
subs = Subscriber.query.filter_by(request_id=request_id)
subscribers = subs.all()
try:
create_email(request_id=request_id, recipient=user_id, subject=email_subject, time_sent=datetime.now(),
email_content=notification_content)
except Exception, e:
app.logger.error("Unable to store email object \n%s" % e)
for subscriber in subscribers:
if subscriber.should_notify == False:
app.logger.info('''
Expand Down

0 comments on commit 73f3f70

Please sign in to comment.