Fix None instance when querying (#368)

Fix None instance
This commit is contained in:
tonibofarull 2022-09-08 12:53:00 +02:00 committed by GitHub
parent 788d3dfe41
commit 9e17678094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1205,6 +1205,8 @@ class RedisModel(BaseModel, abc.ABC, metaclass=ModelMeta):
offset = 1 # The first item is the count of total matches. offset = 1 # The first item is the count of total matches.
for i in range(1, len(res), step): for i in range(1, len(res), step):
if res[i + offset] is None:
continue
fields = dict( fields = dict(
zip( zip(
map(to_string, res[i + offset][::2]), map(to_string, res[i + offset][::2]),