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