Skip to content

Commit

Permalink
fix: apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
7mochi authored and cmyui committed Sep 24, 2023
1 parent 3370b9c commit 7bf13db
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/repositories/ingame_logins.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,13 @@ async def create(


async def fetch_one(
id: int | None = None,
id: int,
) -> IngameLogin | None:
"""Fetch a login entry from the database."""
if id is None:
raise ValueError("Must provide at least one parameter.")

query = f"""\
SELECT {READ_PARAMS}
FROM ingame_logins
WHERE id = COALESCE(:id, id)
WHERE id = :id
"""
params = {
"id": id,
Expand Down

0 comments on commit 7bf13db

Please sign in to comment.