Browse Source

Fix migrace

pull/3/head
Jonas Havelka 2 years ago
parent
commit
05047d547a
  1. 3
      seminar/migrations/0104_hodnoceni_deadline_body.py

3
seminar/migrations/0104_hodnoceni_deadline_body.py

@ -20,8 +20,10 @@ def prirad_deadliny(apps, schema_editor):
if d is None:
d = Deadline.objects.filter(cislo__rocnik=t.rocnik).last()
if d is not None:
h.deadline_body = d
h.save()
continue
except Exception:
pass
@ -49,6 +51,7 @@ def prirad_deadliny(apps, schema_editor):
d = Deadline.objects.filter(cislo=cislo, deadline__gte=h.reseni.cas_doruceni).first()
if d is None:
d = Deadline.objects.filter(cislo=cislo).last()
if d is not None:
h.deadline_body = d
h.save()
continue

Loading…
Cancel
Save