Update app/model_manager.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
yt-koike 2026-04-06 22:43:20 +09:00 committed by GitHub
parent 447b15b9a0
commit ffd4a002ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,11 +88,11 @@ class ModelFileManager:
url = json_data.get("url", None)
if url is None:
logging.error("URL is not provided")
return web.Response(status=401)
return web.Response(status=400)
save_dir = json_data.get("save_dir", None)
if save_dir not in folder_paths.folder_names_and_paths:
logging.error("Save directory is not valid")
return web.Response(status=401)
return web.Response(status=400)
filename = json_data.get("filename", url.split("/")[-1])
token = json_data.get("token", None)