Skip to content

Commit

Permalink
Fix bad bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespfennell committed Jun 1, 2020
1 parent 6741623 commit 1bb58de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions transiter/services/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SystemLarge(System):
class SystemUpdate(View):
id: str
status: models.SystemUpdate.Status
stack_trace: typing.List[str]
stack_trace: typing.Optional[typing.List[str]]
scheduled_at: datetime.datetime
completed_at: datetime.datetime
system: System = NULL
Expand All @@ -78,7 +78,9 @@ def from_model(cls, update: models.SystemUpdate):
return cls(
id=str(update.pk),
status=update.status,
stack_trace=update.status_message.splitlines(),
stack_trace=update.status_message.splitlines()
if update.status_message is not None
else None,
scheduled_at=update.scheduled_at,
completed_at=update.completed_at,
)
Expand Down

0 comments on commit 1bb58de

Please sign in to comment.