Browse Source

Migr 0052 e-maily nejsou case-sensitive

middleware_test
Pavel "LEdoian" Turinsky 4 years ago
parent
commit
f29ff541dc
  1. 2
      seminar/migrations/0001_squashed_0067_auto_20190814_0805.py
  2. 2
      seminar/migrations/0052_user_to_organizator.py

2
seminar/migrations/0001_squashed_0067_auto_20190814_0805.py

@ -128,7 +128,7 @@ def spoj_k_organizatorum_osoby(apps, scema_editor):
raise EndException raise EndException
# Hledáme podle e-mailu # Hledáme podle e-mailu
osoby = Osoba.objects.filter(email=user.email) osoby = Osoba.objects.filter(email__iexact=user.email)
if osoby.count() != 0 and user.email != '': if osoby.count() != 0 and user.email != '':
osoba = osoby.first() osoba = osoby.first()
if osoba.user is None: if osoba.user is None:

2
seminar/migrations/0052_user_to_organizator.py

@ -36,7 +36,7 @@ def spoj_k_organizatorum_osoby(apps, scema_editor):
raise EndException raise EndException
# Hledáme podle e-mailu # Hledáme podle e-mailu
osoby = Osoba.objects.filter(email=user.email) osoby = Osoba.objects.filter(email__iexact=user.email)
if osoby.count() != 0 and user.email != '': if osoby.count() != 0 and user.email != '':
osoba = osoby.first() osoba = osoby.first()
if osoba.user is None: if osoba.user is None:

Loading…
Cancel
Save