Skip to content

Commit

Permalink
fix: allow lazy loading when finding individual pacts
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Mar 21, 2022
1 parent ae9eb20 commit 04e03cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pact_broker/pacts/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04e03cb

Please sign in to comment.