Skip to content

Commit

Permalink
Fix: job history might be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
encetamasb committed Jan 31, 2022
1 parent 160d808 commit f09c653
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsd_moonraker/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def wait_for_sub_id(event):

def _received_last_job(self, event):
if 'jobs' in event.data.get('result', {}):
jobs = event.data.get('result', {}).get('jobs', [None])
jobs = event.data.get('result', {}).get('jobs', [None]) or [None]
self.on_event(
Event(sender=self.id, name='last_job', data=jobs[0])
)
Expand Down

0 comments on commit f09c653

Please sign in to comment.