diff --git a/main.py b/main.py index 5ac7607..a347dbd 100644 --- a/main.py +++ b/main.py @@ -228,8 +228,8 @@ async def getgameprice(request: Request, oldGameId: int, nums: int = 0): gameprice['prices'] = price[:nums] else: logger.error(f"get price with {oldGameId} failed\n {gameprice}") - gameprice = {"prices": []} - + if not gameprice: + gameprice = {"prices": []} logger.info(f"get gameprice with {oldGameId} !") return JSONResponse( status_code=starlette.status.HTTP_200_OK,