author-stat-fix-9

This commit is contained in:
Untone 2024-03-28 23:59:53 +03:00
parent 4b5c101f2f
commit 8f532b0023

View File

@ -154,10 +154,10 @@ def get_with_stat(q, with_rating=False):
if is_author: if is_author:
stat['comments'] = cols[4] stat['comments'] = cols[4]
if with_rating: if with_rating:
logger.debug('author, shouts, authors, followers, comments, author_likes, author_dislikes, shouts_likes, shouts_dislikes, comment_likes, comments_dislikes') # logger.debug('author, shouts, authors, followers, comments, author_likes, author_dislikes, shouts_likes, shouts_dislikes, comment_likes, comments_dislikes')
logger.debug(cols) logger.debug(cols)
stat['rating'] = cols[6] - cols[7] stat['rating'] = cols[6] - cols[7]
stat['rating_shouts'] = cols[8] - cols[9] # stat['rating_shouts'] = cols[8] - cols[9]
entity.stat = stat entity.stat = stat
records.append(entity) records.append(entity)
except Exception as exc: except Exception as exc: