From b84c6b7b92823ea6678eaafdbfd100b062882cc1 Mon Sep 17 00:00:00 2001 From: pengtao Date: Wed, 22 Dec 2021 10:12:17 +0800 Subject: [PATCH] 1 --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,