Differentiate between different kinds of uploads

Knowing what kind of upload a thing is is useful.

And the information that is useful to show about each upload depends on
what kind of upload it is.
This commit is contained in:
Chris Hill-Scott
2020-02-27 14:03:03 +00:00
parent 2770e5013b
commit ee8436ca85
8 changed files with 123 additions and 45 deletions

View File

@@ -31,6 +31,7 @@ class Job(JSONModel):
'notification_count',
'created_by',
'template_type',
'recipient',
}
@classmethod
@@ -57,6 +58,10 @@ class Job(JSONModel):
def upload_type(self):
return self._dict.get('upload_type')
@property
def pdf_letter(self):
return self.upload_type == 'letter'
@property
def processing_started(self):
if not self._dict.get('processing_started'):