Merge branch 'master' into stable
This commit is contained in:
		
						commit
						85a04909a9
					
				
					 2 changed files with 22 additions and 3 deletions
				
			
		
							
								
								
									
										19
									
								
								korektury/migrations/0015_auto_20161004_2005.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								korektury/migrations/0015_auto_20161004_2005.py
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  | from __future__ import unicode_literals | ||||||
|  | 
 | ||||||
|  | from django.db import migrations, models | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  | 
 | ||||||
|  |     dependencies = [ | ||||||
|  |         ('korektury', '0014_add_org_to_pdf'), | ||||||
|  |     ] | ||||||
|  | 
 | ||||||
|  |     operations = [ | ||||||
|  |         migrations.AlterField( | ||||||
|  |             model_name='korekturovanepdf', | ||||||
|  |             name='org', | ||||||
|  |             field=models.ForeignKey(default=None, blank=True, to='seminar.Organizator', help_text=b'Zodpov\xc4\x9bdn\xc3\xbd organiz\xc3\xa1tor za obsah', null=True), | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
|  | @ -136,9 +136,6 @@ class KorekturyView(generic.TemplateView): | ||||||
|         # Prijemci e-mailu |         # Prijemci e-mailu | ||||||
|         emails = set() |         emails = set() | ||||||
|         email = oprava.autor.user.email |         email = oprava.autor.user.email | ||||||
|         # e-mail autora opravy (TODO odstranit z prijemcu) |  | ||||||
|         if email: |  | ||||||
|             emails.add(email) |  | ||||||
|         # nalezeni e-mailu na organizatory komentaru |         # nalezeni e-mailu na organizatory komentaru | ||||||
|         for komentar in oprava.komentar_set.all(): |         for komentar in oprava.komentar_set.all(): | ||||||
|             email = komentar.autor.user.email |             email = komentar.autor.user.email | ||||||
|  | @ -149,6 +146,9 @@ class KorekturyView(generic.TemplateView): | ||||||
|             email_zobpovedny = oprava.pdf.org.user.email |             email_zobpovedny = oprava.pdf.org.user.email | ||||||
|             if email_zobpovedny: |             if email_zobpovedny: | ||||||
|                 emails.add(email_zobpovedny) |                 emails.add(email_zobpovedny) | ||||||
|  |         # odstran e-mail autora opravy | ||||||
|  |         if email: | ||||||
|  |             emails.discard(email) | ||||||
| 
 | 
 | ||||||
|         send_mail(subject, text, from_email, list(emails)) |         send_mail(subject, text, from_email, list(emails)) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha