remove unnecessary part of query

pull/146/head
Aevann 2023-05-05 09:07:00 +03:00
parent f5414aa67c
commit 5ac63845f4
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ def hat_owners(v:User, hat_id):
page = get_page()
users = [x[1] for x in g.db.query(Hat, User).join(Hat.owners).filter(Hat.hat_id == hat_id).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE+1).all()]
users = g.db.query(User).join(Hat.owners).filter(Hat.hat_id == hat_id).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE+1).all()
next_exists = (len(users) > PAGE_SIZE)
users = users[:PAGE_SIZE]