Fixed begins / ends time for TOs

This commit is contained in:
richard-dds
2019-06-11 14:35:43 -04:00
parent 13eb277f4a
commit 1de4fe7cc5
2 changed files with 36 additions and 5 deletions

View File

@@ -84,6 +84,14 @@ class TaskOrder(Base, mixins.TimestampsMixin):
def is_unsigned(self):
return self.status == Status.UNSIGNED
@property
def has_begun(self):
return Clock.today() >= self.start_date
@property
def has_ended(self):
return Clock.today() >= self.end_date
@property
def is_completed(self):
return all([self.pdf, self.number, len(self.clins)])