From 3ece203522c0e8f00b468aca6fa19e8a485b9278 Mon Sep 17 00:00:00 2001 From: tonibofarull Date: Fri, 2 Sep 2022 21:23:50 +0200 Subject: [PATCH] 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 5dd3b91a..18874762 100644 --- a/aredis_om/model/model.py +++ b/aredis_om/model/model.py @@ -1205,6 +1205,8 @@ def to_string(s): 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]),