fix a bug in RedisNum filter againt value 0 (#14587)

- **Description:** There is a bug in RedisNum filter that filter towards
value 0 will be parsed as "*". This is a fix to it.
  - **Issue:** NA
  - **Dependencies:** NA
  - **Tag maintainer:** NA
  - **Twitter handle:** NA
This commit is contained in:
dandanwei 2023-12-13 00:34:45 +01:00 committed by GitHub
parent b885880344
commit e5bd88383f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ class RedisNum(RedisFilterField):
def __str__(self) -> str:
"""Return the query syntax for a RedisNum filter expression."""
if not self._value:
if self._value is None:
return "*"
if (