korekrury | oprava kdyz zodpovedny org neexistuje

This commit is contained in:
Bc. Petr Pecha 2016-10-02 11:57:11 +02:00
parent ee1d5fdd18
commit 7b44da7738

View file

@ -145,9 +145,10 @@ class KorekturyView(generic.TemplateView):
if email:
emails.add(email)
# zodpovedny org
email_zobpovedny = oprava.pdf.org.user.email
if email_zobpovedny:
emails.add(email_zobpovedny)
if oprava.pdf.org:
email_zobpovedny = oprava.pdf.org.user.email
if email_zobpovedny:
emails.add(email_zobpovedny)
send_mail(subject, text, from_email, list(emails))