diff --git a/lib/pact_broker/pacts/all_pact_publications.rb b/lib/pact_broker/pacts/all_pact_publications.rb index 4a9d557f3..261eb9292 100644 --- a/lib/pact_broker/pacts/all_pact_publications.rb +++ b/lib/pact_broker/pacts/all_pact_publications.rb @@ -109,7 +109,7 @@ def to_domain_without_tags def head_tag_names # Avoid circular dependency require 'pact_broker/pacts/latest_tagged_pact_publications' - LatestTaggedPactPublications.where(id: id).select(:tag_name).collect{|t| t[:tag_name]} + @head_tag_names ||= LatestTaggedPactPublications.where(id: id).select(:tag_name).collect{|t| t[:tag_name]} end def to_domain_with_content