|
@ -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() |
|
|
|
|
|
|
|
|
h.deadline_body = d |
|
|
if d is not None: |
|
|
h.save() |
|
|
h.deadline_body = d |
|
|
|
|
|
h.save() |
|
|
|
|
|
continue |
|
|
|
|
|
|
|
|
except Exception: |
|
|
except Exception: |
|
|
pass |
|
|
pass |
|
@ -49,9 +51,10 @@ 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() |
|
|
h.deadline_body = d |
|
|
if d is not None: |
|
|
h.save() |
|
|
h.deadline_body = d |
|
|
continue |
|
|
h.save() |
|
|
|
|
|
continue |
|
|
|
|
|
|
|
|
log.warning(f"Deadline hodnocení {h.id} se nepodařil určit exaktnějším způsobem. Zkouším další.") |
|
|
log.warning(f"Deadline hodnocení {h.id} se nepodařil určit exaktnějším způsobem. Zkouším další.") |
|
|
|
|
|
|
|
|