Skip to content

Commit

Permalink
Do not raise an error in sidecar if uploaded file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
polyaxon-ci committed Dec 11, 2024
1 parent 9d1f68d commit f290980
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion haupt/haupt/streams/endpoints/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
async def handle_upload(
request: ASGIRequest, run_uuid: str, is_file: bool
) -> HttpResponse:
content_file = request.FILES["upload_file"]
content_file = request.FILES.get("upload_file")
if not content_file:
return HttpResponse(
content="A file is required to upload a file",
status=status.HTTP_400_BAD_REQUEST,
)
content_json = request.POST.get("json")
content_json = orjson_loads(content_json) if content_json else {}
overwrite = content_json.get("overwrite", True)
Expand Down

0 comments on commit f290980

Please sign in to comment.