TO Review Page

This commit is contained in:
George Drummond
2019-06-10 13:26:25 -04:00
parent e383f6f6ba
commit 0f0a559dfa
5 changed files with 101 additions and 40 deletions

View File

@@ -28,6 +28,15 @@ class CLIN(Base, mixins.TimestampsMixin):
obligated_amount = Column(Numeric(scale=2), nullable=False)
jedi_clin_type = Column(SQLAEnum(JEDICLINType, native_enum=False), nullable=False)
#
# NOTE: For now obligated CLINS are CLIN 1 + CLIN 3
#
def is_obligated(self):
return self.jedi_clin_type in [
JEDICLINType.JEDI_CLIN_1,
JEDICLINType.JEDI_CLIN_3,
]
def to_dictionary(self):
return {
c.name: getattr(self, c.name)