Skip to content

Commit

Permalink
Refactor query_player function to use correct syntax for filtering by…
Browse files Browse the repository at this point in the history
… player_id and current_user_id
  • Loading branch information
fcarboni committed Sep 9, 2024
1 parent 791ab6a commit 3bb8fe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/db/database_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def query_players(db: Session, current_user_id: int):
return db.query(Player).filter(Player.user_id == current_user_id).all()

def query_player(db: Session, player_id: int, current_user_id: int):
return db.query(Player).filter(Player.id == player_id and Player.user_id == current_user_id).first()
return db.query(Player).filter(Player.id == player_id, Player.user_id == current_user_id).first()

0 comments on commit 3bb8fe3

Please sign in to comment.