From 723a0a28184ffea95506ea6898f238d022dc0ac3 Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 13 Oct 2023 12:42:42 +0300 Subject: [PATCH] redis-set-result-fix --- resolvers/load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/load.py b/resolvers/load.py index 2dba848..c1e198a 100644 --- a/resolvers/load.py +++ b/resolvers/load.py @@ -49,7 +49,7 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0): cids = (await redis.execute("SMEMBERS", f"chats_by_author/{author_id}")) or [] members_online = (await redis.execute("SMEMBERS", "authors-online")) or [] await redis.execute('EXEC') - cids = cids[offset:(offset + limit)] + cids = list(cids)[offset:(offset + limit)] chats = [] lock = asyncio.Lock() if len(cids) == 0: