Skip to content

Commit

Permalink
fix: fix error rendering relationships diagram when the number of ind…
Browse files Browse the repository at this point in the history
…ex items is greater than one page
  • Loading branch information
bethesque committed Aug 4, 2020
1 parent 6243c0d commit 93a1998
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact_broker/groups/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def find_group_containing pacticipant
end

def groups
Relationships::Groupify.call index_service.find_index_items
Relationships::Groupify.call(index_service.find_all_index_items)
end
end
end
Expand Down
6 changes: 6 additions & 0 deletions lib/pact_broker/index/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def self.pact_publication_scope
PactBroker.policy_scope!(PactBroker::Pacts::PactPublication)
end

def self.find_all_index_items
# Is there a better way to do this? Setting a page_size of nil or -1 doesn't work
# If we get to 100000000000 index items, we're probably going to have bigger issues...
find_index_items(page_number: 1, page_size: 100000000000)
end

def self.find_index_items options = {}
latest_verifications_for_cv_tags = latest_verifications_for_consumer_version_tags(options)
latest_pact_publication_ids = latest_pact_publications.select(:id).all.collect{ |h| h[:id] }
Expand Down

0 comments on commit 93a1998

Please sign in to comment.