redis-om-python icon indicating copy to clipboard operation
redis-om-python copied to clipboard

Find on empty string or None raise error

Open ttv20 opened this issue 4 months ago • 0 comments

When I try to compare field to empty string or None it is failing instead of returning empty array

class Image(AppJsonModel):
    name: str = Field(index=True)

# Migrator().run()

Image.find(Image.name == None).all() # TypeError: argument of type 'NoneType' is not iterable
Image.find(Image.name == '').all()   # redis.exceptions.ResponseError: Syntax error at offset 5 near pk

ttv20 avatar Feb 19 '24 11:02 ttv20