You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
field=models.DateField(default=datetime.date.today, help_text=b"Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away.", null=True),
start_date=models.DateField(default=datetime.date.today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away.")
37
+
start_date=models.DateField(default=datetime.date.today, null=True, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away.")
38
38
end_date=models.DateField(blank=True, null=True, help_text="Leaving the end date blank means that the period continues indefinitely. You can end it later.")
39
39
AVAILABILITY_CHOICES= [
40
40
("canfinish", "Can do follow-ups"),
@@ -49,7 +49,7 @@ class UnavailablePeriod(models.Model):
49
49
defstate(self):
50
50
importdatetime
51
51
today=datetime.date.today()
52
-
ifself.start_date<=today:
52
+
ifself.start_dateisNoneorself.start_date<=today:
53
53
ifnotself.end_dateortoday<=self.end_date:
54
54
return"active"
55
55
else:
@@ -58,7 +58,7 @@ def state(self):
58
58
return"future"
59
59
60
60
def__unicode__(self):
61
-
returnu"{} is unavailable in {} {} - {}".format(self.person, self.team.acronym, self.start_date, self.end_dateor"")
61
+
returnu"{} is unavailable in {} {} - {}".format(self.person, self.team.acronym, self.start_dateor"", self.end_dateor"")
62
62
63
63
classReviewWish(models.Model):
64
64
"""Reviewer wishes to review a document when it becomes available for review."""
0 commit comments