From e226378399adf551110d2d9399170d32c8eef63c Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Thu, 12 Dec 2024 23:15:08 +0100 Subject: [PATCH] fix: use null instead of empty SQL statement --- src/ports/nfts/queries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ports/nfts/queries.ts b/src/ports/nfts/queries.ts index 6eb8b36..cdbabfa 100644 --- a/src/ports/nfts/queries.ts +++ b/src/ports/nfts/queries.ts @@ -115,7 +115,7 @@ function getFilteredNFTCTE(nftFilters: GetNFTsFilters, uncapped = false): SQLSta function getFilteredEstateCTE(filters: GetNFTsFilters): SQLStatement { const FILTER_BY_OWNER = filters.owner ? SQL` est.owner_id IN (SELECT id FROM squid_marketplace.account WHERE address = ${filters.owner.toLocaleLowerCase()}) ` - : SQL`` + : null const FILTER_MIN_ESTATE_SIZE = filters.minEstateSize ? SQL` est.size >= ${filters.minEstateSize} ` : SQL` est.size > 0 ` const FILTER_MAX_ESTATE_SIZE = filters.maxEstateSize ? SQL` est.size <= ${filters.maxEstateSize} ` : null