rating-stat-fix
All checks were successful
Deploy on push / deploy (push) Successful in 23s

This commit is contained in:
Untone 2024-03-28 20:42:22 +03:00
parent 029e6af161
commit d6bf3e1602

View File

@ -168,7 +168,7 @@ def get_with_stat(q):
is_topic = f'{q}'.lower().startswith('select topic') is_topic = f'{q}'.lower().startswith('select topic')
if is_author: if is_author:
q = add_author_stat_columns(q) q = add_author_stat_columns(q)
# q = add_author_ratings(q) # TODO: move rating to cols down there q = add_author_ratings(q) # TODO: move rating to cols down there
elif is_topic: elif is_topic:
q = add_topic_stat_columns(q) q = add_topic_stat_columns(q)
records = [] records = []
@ -184,8 +184,8 @@ def get_with_stat(q):
if is_author: if is_author:
stat['comments'] = cols[4] stat['comments'] = cols[4]
# entity.stat['topics'] = cols[5] # entity.stat['topics'] = cols[5]
# entity.stat['rating'] = cols[5] - cols[6] entity.stat['rating'] = cols[5] - cols[6]
# entity.stat['rating_shouts'] = cols[7] - cols[8] entity.stat['rating_shouts'] = cols[7] - cols[8]
entity.stat = stat entity.stat = stat
records.append(entity) records.append(entity)
except Exception as exc: except Exception as exc: