From 04e03cb20f12fd4fa51adad2bbd424e745449c51 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 21 Mar 2022 15:56:05 +1100 Subject: [PATCH] fix: allow lazy loading when finding individual pacts --- lib/pact_broker/pacts/repository.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pact_broker/pacts/repository.rb b/lib/pact_broker/pacts/repository.rb index 74f91db4b..606c1cd2c 100644 --- a/lib/pact_broker/pacts/repository.rb +++ b/lib/pact_broker/pacts/repository.rb @@ -264,12 +264,14 @@ def find_pact consumer_name, consumer_version_number, provider_name, pact_versio else latest_pact_publication_by_sha .eager(:tags) + .all_allowing_lazy_load .collect(&:to_domain_with_content).first end else pact_publication_by_consumer_version .eager(:tags) .reverse_order(:consumer_version_order, :revision_number) + .all_allowing_lazy_load .collect(&:to_domain_with_content).first end end