Skip to content

Commit 4278d3c

Browse files
authored
Merge pull request #1418 from griffithlab/fix-approval-batch-loading
fix typo and logic in approval batch loading
2 parents be7e81e + 88b497d commit 4278d3c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

server/app/graphql/types/entities/approval_type.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ def clinvar_accession_visible
4343
if entries.blank?
4444
true
4545
else
46-
Promise.all([
46+
release_status_promises = entries.map do |entry|
4747
Loaders::AssociationLoader
4848
.for(ClinvarBatchEntry, :clinvar_batch_submission)
4949
.load(entry)
50-
.then { |batch| batch&.release_status },
51-
]).then do |relase_statuses|
50+
.then { |batch| batch&.release_status }
51+
end
52+
53+
Promise.all(release_status_promises).then do |release_statuses|
5254
release_statuses.any? { |s| s == "released" }
5355
end
5456
end

0 commit comments

Comments
 (0)