fix the reported error on crons
This commit is contained in:
parent
8655579a94
commit
885ae009f4
|
@ -26,7 +26,8 @@ module Travis::API::V3
|
|||
return false
|
||||
end
|
||||
|
||||
user_id = branch.repository.users.detect { |u| u.github_oauth_token }.id
|
||||
user_id = branch.repository.users.detect { |u| u.github_oauth_token }.try(:id)
|
||||
user_id ||= branch.repository.owner.id
|
||||
|
||||
payload = {
|
||||
repository: { id: branch.repository.github_id, owner_name: branch.repository.owner_name, name: branch.repository.name },
|
||||
|
|
Loading…
Reference in New Issue
Block a user