From 9e17678094d7c0bde7b0912481632f4814686cb3 Mon Sep 17 00:00:00 2001 From: tonibofarull Date: Thu, 8 Sep 2022 12:53:00 +0200 Subject: [PATCH] Fix None instance when querying (#368) Fix None instance --- aredis_om/model/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aredis_om/model/model.py b/aredis_om/model/model.py index 5dd3b91..1887476 100644 --- a/aredis_om/model/model.py +++ b/aredis_om/model/model.py @@ -1205,6 +1205,8 @@ class RedisModel(BaseModel, abc.ABC, metaclass=ModelMeta): offset = 1 # The first item is the count of total matches. for i in range(1, len(res), step): + if res[i + offset] is None: + continue fields = dict( zip( map(to_string, res[i + offset][::2]),