Pavel 'LEdoian' Turinsky
5 years ago
3 changed files with 37 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||
# 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) |
|||
] |
Loading…
Reference in new issue