fix per-user-statistics

This commit is contained in:
gluap 2023-07-08 14:05:23 +02:00
parent 74c7e6444e
commit 4f44cc0e56
No known key found for this signature in database

View file

@ -45,7 +45,7 @@ async def stats(req):
# Only the user can look for their own stats, for now # Only the user can look for their own stats, for now
by_user = ( by_user = (
user is not None and req.ctx.user is not None and req.ctx.user.username == user user is not None and req.ctx.user is not None and req.ctx.user.id == int(user)
) )
if by_user: if by_user:
conditions.append(Track.author_id == req.ctx.user.id) conditions.append(Track.author_id == req.ctx.user.id)