22 lines
		
	
	
	
		
			478 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			478 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Generated by Django 2.2.9 on 2020-01-15 21:28
 | |
| 
 | |
| from django.db import migrations
 | |
| 
 | |
| def copy_mails(apps, schema_editor):
 | |
| 	Osoba = apps.get_model('seminar', 'Osoba')
 | |
| 
 | |
| 	for o in Osoba.objects.all():
 | |
| 		if o.user is not None:
 | |
| 			u = o.user
 | |
| 			u.email = o.email
 | |
| 			u.save()
 | |
| 
 | |
| class Migration(migrations.Migration):
 | |
| 
 | |
|     dependencies = [
 | |
|         ('seminar', '0072_auto_20191204_2257'),
 | |
|     ]
 | |
| 
 | |
|     operations = [
 | |
|         migrations.RunPython(copy_mails, migrations.RunPython.noop)
 | |
|     ]
 | 
