mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
Don’t assume jobs status will be present
The API response for jobs includes a field called `job_status`. The API response for uploads doesn’t. The `Job` mode handles uploads and jobs, so it needs to account for the possibility of the field not being there.
This commit is contained in:
@@ -34,7 +34,7 @@ class Job(JSONModel):
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
return self.job_status
|
||||
return self._dict.get('job_status')
|
||||
|
||||
@property
|
||||
def cancelled(self):
|
||||
|
||||
Reference in New Issue
Block a user