mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-02-19 15:35:18 -05:00
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>
This commit is contained in:
committed by
GitHub
parent
079ac1b130
commit
855385b097
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user