general stuffs :3

This commit is contained in:
Michał Gdula 2023-06-26 22:40:51 +00:00
parent 54cb3015dc
commit 92a94c66ac
4 changed files with 17 additions and 18 deletions

View file

@ -34,15 +34,14 @@ def index():
)
else:
user = Users.query.filter_by(username=user_arg).first()
# get all tags from the junction table and add them to a list of tags
tags = (
db.session.query(Tags)
.join(TagJunction)
.filter(TagJunction.user_id == user.id)
.all()
)
if user:
scores = scores.filter_by(user_id=user.id)
tags = (
db.session.query(Tags)
.join(TagJunction)
.filter(TagJunction.user_id == user.id)
.all()
)
else:
abort(404, "User not found")