Skip to content

Commit 7c57450

Browse files
committed
Only fetch user if restarted_by is not nil
1 parent e66d573 commit 7c57450

File tree

1 file changed

+1
-1
lines changed
  • lib/travis/api/v3/models

1 file changed

+1
-1
lines changed

lib/travis/api/v3/models/job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def migrated?
6868
end
6969

7070
def restarter
71-
@restarter ||= Travis::API::V3::Models::User.find(restarted_by)
71+
@restarter ||= Travis::API::V3::Models::User.find(restarted_by) if restarted_by
7272
end
7373

7474
private def enterprise?

0 commit comments

Comments
 (0)