A teď je zlomový deadline určen prakticky kompletně
This commit is contained in:
parent
32ac5188a6
commit
1f12f5c7ec
1 changed files with 5 additions and 1 deletions
|
@ -331,7 +331,11 @@ class Cislo(SeminarModelBase):
|
||||||
def zlomovy_deadline_pro_papirove_cislo(self):
|
def zlomovy_deadline_pro_papirove_cislo(self):
|
||||||
prvni_deadline = Deadline.objects.filter(Q(typ=Deadline.TYP_PRVNI) | Q(typ=Deadline.TYP_PRVNI_A_SOUS), cislo=self).first()
|
prvni_deadline = Deadline.objects.filter(Q(typ=Deadline.TYP_PRVNI) | Q(typ=Deadline.TYP_PRVNI_A_SOUS), cislo=self).first()
|
||||||
if prvni_deadline is None:
|
if prvni_deadline is None:
|
||||||
return self.posledni_deadline
|
posledni_deadline = self.posledni_deadline
|
||||||
|
if posledni_deadline is None:
|
||||||
|
# TODO promyslet, co se má stát tady
|
||||||
|
return Deadline.objects.filter(Q(cislo__poradi__lt=self.poradi) | Q(cislo__rocnik__rocnik__lt=self.rocnik.rocnik)).order_by("deadline").last()
|
||||||
|
return posledni_deadline
|
||||||
return prvni_deadline
|
return prvni_deadline
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue