diff --git a/graphql-server/src/utils/oncotree.ts b/graphql-server/src/utils/oncotree.ts index 983d91b0..fd76b897 100644 --- a/graphql-server/src/utils/oncotree.ts +++ b/graphql-server/src/utils/oncotree.ts @@ -127,11 +127,11 @@ export function includeCancerTypeFieldsInSearch( // ... // ] const sampleMetadataFilters = - // Request Samples view handler - customWhere?.hasMetadataSampleMetadata_SOME?.OR || // Other views handler customWhere?.OR?.find((filter) => filter.hasMetadataSampleMetadata_SOME) - ?.hasMetadataSampleMetadata_SOME?.OR; + ?.hasMetadataSampleMetadata_SOME?.OR || + // Request Samples view handler + customWhere?.hasMetadataSampleMetadata_SOME?.OR; if (sampleMetadataFilters?.length) { // Extract the user query: searchValues equal ["someValue"] for a single-value search