Browse Source

Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations

export_seznamu_prednasek
Kateřina Č 4 years ago
parent
commit
5aede17657
  1. 4
      seminar/migrations/0052_user_to_organizator.py

4
seminar/migrations/0052_user_to_organizator.py

@ -57,8 +57,8 @@ def spoj_k_organizatorum_osoby(apps, scema_editor):
osoba.jmeno = user.first_name osoba.jmeno = user.first_name
osoba.prijmeni = user.last_name osoba.prijmeni = user.last_name
osoba.email = user.email osoba.email = user.email
user.jmeno += " (Uživatel!)" user.first_name += " (Uživatel!)"
user.prijmeni += " (Uživatel!)" user.last_name += " (Uživatel!)"
osoba.datum_registrace = min(osoba.datum_registrace, user.date_joined, key=lambda d: d if d is not None else date.max) osoba.datum_registrace = min(osoba.datum_registrace, user.date_joined, key=lambda d: d if d is not None else date.max)
user.save() user.save()

Loading…
Cancel
Save