From bfa3eb3352775a34bd75b731192c0141ddcdf394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80=C3=AE=C3=97=C3=9A=C3=95=C3=B1?= Date: Thu, 18 Aug 2022 19:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=98=A0=E5=B0=84=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/query.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index 45cc080..e849c91 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -251,6 +251,8 @@ async def event_model( game = 'mzmfmh5' chinese = {} resp = await crud.select_map.get_one(db, game, i) + if not resp: + continue for ii in resp: chinese[ii['id']] = ii['title'] for k, v in chinese.items(): @@ -639,6 +641,8 @@ async def retention_model(request: Request, game = 'mzmfmh5' chinese = {} resp = await crud.select_map.get_one(db, game, i) + if not resp: + continue for ii in resp: chinese[ii['id']] = ii['title'] for k, v in chinese.items(): @@ -1137,6 +1141,8 @@ async def funnel_model( game = 'mzmfmh5' chinese = {} resp = await crud.select_map.get_one(db, game, i) + if not resp: + continue for ii in resp: chinese[ii['id']] = ii['title'] for k, v in chinese.items():