lib/pact_broker/badges/service.rb in pact_broker-2.50.1 vs lib/pact_broker/badges/service.rb in pact_broker-2.51.0
- old
+ new
@@ -37,9 +37,10 @@
end
private
def badge_title pact, label, initials
+ return 'pact not found' if pact.nil?
title = case (label || '').downcase
when 'consumer' then prepare_name(pact.consumer_name, initials)
when 'provider' then prepare_name(pact.provider_name, initials)
else "#{prepare_name(pact.consumer_name, initials)}%2F#{prepare_name(pact.provider_name, initials)}"
end