From 6047afaed2982b83a25a6571ffb270579799dde2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80=C3=AE=C3=97=C3=9A=C3=95=C3=B1?= Date: Mon, 13 Jun 2022 16:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=88=86=E7=BB=84=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/query.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index e26f421..93849d2 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -394,8 +394,9 @@ async def event_model( groups = [] for gitem in item['groups']: gb = [] - if '(' in gitem: - gitem = gitem.strip('(').strip(')').replace(' ', '').replace("'", '') + if '(' in gitem or '[' in gitem: + gitem = gitem.replace('(', '').replace(')', '').replace(' ', '').replace("'", '') \ + .replace('[', '').replace(']', '') if isinstance(gitem, list): true_list = gitem else: