We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents be7e81e + 88b497d commit 4278d3cCopy full SHA for 4278d3c
1 file changed
server/app/graphql/types/entities/approval_type.rb
@@ -43,12 +43,14 @@ def clinvar_accession_visible
43
if entries.blank?
44
true
45
else
46
- Promise.all([
+ release_status_promises = entries.map do |entry|
47
Loaders::AssociationLoader
48
.for(ClinvarBatchEntry, :clinvar_batch_submission)
49
.load(entry)
50
- .then { |batch| batch&.release_status },
51
- ]).then do |relase_statuses|
+ .then { |batch| batch&.release_status }
+ end
52
+
53
+ Promise.all(release_status_promises).then do |release_statuses|
54
release_statuses.any? { |s| s == "released" }
55
end
56
0 commit comments