Skip to content

Commit

Permalink
fix: gracefully handle pact webhook status when there is no pact yet
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 11, 2019
1 parent 2312fa8 commit ba1f6bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pact_broker/webhooks/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ def delete_triggered_webhooks_by_pact_publication_ids pact_publication_ids
end

def find_latest_triggered_webhooks_for_pact pact
find_latest_triggered_webhooks(pact.consumer, pact.provider)
if pact
find_latest_triggered_webhooks(pact.consumer, pact.provider)
else
[]
end
end

def find_latest_triggered_webhooks consumer, provider
Expand Down

0 comments on commit ba1f6bc

Please sign in to comment.