reaction-cudl-log

This commit is contained in:
2024-03-06 14:09:21 +03:00
parent 2c1bfaf0fe
commit 7199539a28
2 changed files with 10 additions and 5 deletions

View File

@@ -192,13 +192,16 @@ def get_with_stat(q):
with local_session() as session:
for cols in session.execute(q):
entity = cols[0]
entity.stat = {'shouts': cols[1], 'authors': cols[2], 'followers': cols[3]}
entity.stat = {}
entity.stat['shouts'] = cols[1]
entity.stat['authors'] = cols[2]
entity.stat['followers'] = cols[3]
entity.stat['comments'] = cols[4]
if is_author:
entity.stat['comments'] = cols[4]
entity.stat['topics'] = cols[5]
# entity.stat['rating'] = cols[5] - cols[6]
# entity.stat['rating_shouts'] = cols[7] - cols[8]
pass
records.append(entity)
return records