Fix exception with endpoints returning HTTP status code 204. Fixes #1891

This commit is contained in:
grossmj committed 2021-08-10 21:53:21 +09:30
1 parent 36b9f8bdfd
commit ce55ec73a4
29 files changed
+337 -192

No files matched your search

+4 -2
View File
@@ -21,7 +21,7 @@ API routes for symbols.
import os
from fastapi import APIRouter, Request, Depends, status
from fastapi import APIRouter, Request, Depends, Response, status
from fastapi.responses import FileResponse
from typing import List
@@ -95,7 +95,7 @@ def get_default_symbols() -> dict:
dependencies=[Depends(get_current_active_user)],
status_code=status.HTTP_204_NO_CONTENT
)
async def upload_symbol(symbol_id: str, request: Request) -> None:
async def upload_symbol(symbol_id: str, request: Request) -> Response:
"""
Upload a symbol file.
"""
@@ -111,3 +111,5 @@ async def upload_symbol(symbol_id: str, request: Request) -> None:
# Reset the symbol list
controller.symbols.list()
return Response(status_code=status.HTTP_204_NO_CONTENT)