Skip to content

Commit

Permalink
Merge pull request #218 from decentraland/fix/nfts-query-filters
Browse files Browse the repository at this point in the history
fix: use null instead of empty SQL statement
  • Loading branch information
juanmahidalgo authored Dec 12, 2024
2 parents ffe4298 + e226378 commit 82d2091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ports/nfts/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82d2091

Please sign in to comment.