Skip to content

Commit

Permalink
Merge pull request #227 from decentraland/fix/filter-zero-if-owner
Browse files Browse the repository at this point in the history
fix: add size filter if there is owner
  • Loading branch information
juanmahidalgo authored Dec 15, 2024
2 parents 76e6337 + 1d8f53d commit 63eadbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ports/nfts/landQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ export function getLANDs(nftFilters: GetNFTsFilters): SQLStatement {
SELECT *
FROM squid_marketplace.nft
`
.append(getWhereStatementFromFilters([SQL`search_is_land = true`, SQL` search_estate_size > 0`, NFT_OWNER_FILTER]))
.append(
getWhereStatementFromFilters([SQL`search_is_land = true`, NFT_OWNER_FILTER ? SQL` search_estate_size > 0` : null, NFT_OWNER_FILTER])
)
.append(ids ? SQL` AND id = ANY(${ids}) ` : SQL``)
.append(
SQL`
Expand Down

0 comments on commit 63eadbc

Please sign in to comment.