From 855385b097932d09efbbf2015ec4be0646e021b2 Mon Sep 17 00:00:00 2001 From: Maximilian Dorninger <97409287+maxdorninger@users.noreply.github.com> Date: Thu, 30 Oct 2025 16:25:44 +0100 Subject: [PATCH] Apply suggestion from @Copilot raise exception rather than return it and fix var name switch up Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- media_manager/torrent/router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/media_manager/torrent/router.py b/media_manager/torrent/router.py index eeb1936..19b1292 100644 --- a/media_manager/torrent/router.py +++ b/media_manager/torrent/router.py @@ -77,8 +77,8 @@ def update_torrent_status( torrent.imported = imported if state is not None: torrent.status = state - if status is None and imported is None: - return HTTPException( + if state is None and imported is None: + raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, detail="No status or imported value provided", )