korektury | neposilej autorovy textu e-mail
This commit is contained in:
		
							parent
							
								
									7b44da7738
								
							
						
					
					
						commit
						a151044049
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -136,9 +136,6 @@ class KorekturyView(generic.TemplateView): | |||
|         # Prijemci e-mailu | ||||
|         emails = set() | ||||
|         email = oprava.autor.user.email | ||||
|         # e-mail autora opravy (TODO odstranit z prijemcu) | ||||
|         if email: | ||||
|             emails.add(email) | ||||
|         # nalezeni e-mailu na organizatory komentaru | ||||
|         for komentar in oprava.komentar_set.all(): | ||||
|             email = komentar.autor.user.email | ||||
|  | @ -149,6 +146,9 @@ class KorekturyView(generic.TemplateView): | |||
|             email_zobpovedny = oprava.pdf.org.user.email | ||||
|             if email_zobpovedny: | ||||
|                 emails.add(email_zobpovedny) | ||||
|         # odstran e-mail autora opravy | ||||
|         if email: | ||||
|             emails.discard(email) | ||||
| 
 | ||||
|         send_mail(subject, text, from_email, list(emails)) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha