From d5a9a18c04153095964bb8cc48698937b6c04c80 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 12 Mar 2024 15:05:45 +0300 Subject: [PATCH] dict-fix --- resolvers/stat.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resolvers/stat.py b/resolvers/stat.py index d8277376..adf97897 100644 --- a/resolvers/stat.py +++ b/resolvers/stat.py @@ -179,8 +179,6 @@ def get_with_stat(q): with local_session() as session: for cols in session.execute(q): entity = cols[0] - if not isinstance(entity, dict): - entity = entity.dict() stat = dict() stat["shouts"] = cols[1] stat["authors"] = cols[2] @@ -190,7 +188,7 @@ def get_with_stat(q): # entity.stat['topics'] = cols[5] # entity.stat['rating'] = cols[5] - cols[6] # entity.stat['rating_shouts'] = cols[7] - cols[8] - entity['stat'] = stat + entity.stat = stat records.append(entity) except Exception as exc: logger.debug(cols)