counters fixes

This commit is contained in:
2022-08-17 10:59:17 +03:00
parent ab9d03aac6
commit 04aaaab609
5 changed files with 32 additions and 29 deletions

View File

@@ -22,10 +22,9 @@ class Reaction(Base):
@property
async def stat(self):
rrr = await ReactedStorage.get_reaction(self.id)
print(rrr[0])
return {
"viewed": await ViewedStorage.get_reaction(self.id),
"reacted": len(rrr),
"rating": await ReactedStorage.get_reaction_rating(self.id)
"reacted": len(await ReactedStorage.get_reaction(self.id)),
"rating": await ReactedStorage.get_reaction_rating(self.id),
"commented": len(await ReactedStorage.get_reaction_comments(self.id))
}