Skip to content

Commit 59f76c7

Browse files
committed
fix: correct foreign key between AllPactPublications and PactVersion
This was causing the wrong content to be loaded when two consumers had identical verificable content. Fixes: pact-foundation#249
1 parent 2f014f0 commit 59f76c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pact_broker/pacts/all_pact_publications.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AllPactPublications < Sequel::Model(:all_pact_publications)
1515

1616
set_primary_key :id
1717
associate(:one_to_many, :tags, :class => "PactBroker::Domain::Tag", :reciprocal => :version, :key => :version_id, :primary_key => :consumer_version_id)
18-
associate(:many_to_one, :pact_version, :key => :pact_version_sha, :primary_key => :sha)
18+
associate(:many_to_one, :pact_version, :key => :pact_version_id, :primary_key => :id)
1919

2020
dataset_module do
2121
include PactBroker::Repositories::Helpers

0 commit comments

Comments
 (0)