diff --git a/lib/pact_broker/pacticipants/repository.rb b/lib/pact_broker/pacticipants/repository.rb index bbb42d1af..1798efe2e 100644 --- a/lib/pact_broker/pacticipants/repository.rb +++ b/lib/pact_broker/pacticipants/repository.rb @@ -42,13 +42,13 @@ def find_by_name_or_create name end def create args - id = PactBroker::Domain::Pacticipant.dataset.insert_ignore.insert( + PactBroker::Domain::Pacticipant.dataset.insert_ignore.insert( name: args[:name], repository_url: args[:repository_url], created_at: Sequel.datetime_class.now, updated_at: Sequel.datetime_class.now ) - PactBroker::Domain::Pacticipant.find(id: id) + PactBroker::Domain::Pacticipant.find(name: args[:name]) end def pacticipant_names