stat-fix
This commit is contained in:
parent
6c607732a8
commit
16bbe995b7
|
@ -178,20 +178,18 @@ async def load_shouts_by(_, info, options):
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
for [
|
for [
|
||||||
shout,
|
shout,
|
||||||
viewed_stat,
|
|
||||||
reacted_stat,
|
reacted_stat,
|
||||||
commented_stat,
|
commented_stat,
|
||||||
rating_stat,
|
rating_stat,
|
||||||
_last_comment
|
_last_comment,
|
||||||
] in session.execute(q).unique():
|
] in session.execute(q).unique():
|
||||||
shouts.append(shout)
|
|
||||||
shout.stat = {
|
shout.stat = {
|
||||||
"viewed": viewed_stat,
|
"viewed": ViewedStorage.get_shout(shout.slug),
|
||||||
"reacted": reacted_stat,
|
"reacted": reacted_stat,
|
||||||
"commented": commented_stat,
|
"commented": commented_stat,
|
||||||
"rating": rating_stat,
|
"rating": rating_stat,
|
||||||
# "last_comment": last_comment
|
|
||||||
}
|
}
|
||||||
|
shouts.append(shout)
|
||||||
shouts_map[shout.id] = shout
|
shouts_map[shout.id] = shout
|
||||||
|
|
||||||
return shouts
|
return shouts
|
||||||
|
|
Loading…
Reference in New Issue
Block a user