From abaf52ae9d15404b7075318e750d8c2e8600ccc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80=C3=AE=C3=97=C3=9A=C3=95=C3=B1?= Date: Fri, 16 Sep 2022 19:27:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index f96b6ca..6fce475 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -141,7 +141,11 @@ def chkData(data): education = res1['education'] res1['education'] = education_dict[education] if 'teacher_txt' in res1: - teacher_txt = json.loads(res1['teacher_txt']) + teacher_txt = res1['teacher_txt'] + if not teacher_txt: + teacher_txt = teacher_txt + else: + teacher_txt = json.loads(teacher_txt) res1['teacher_txt'] = teacher_txt res_data.append(res1) return res_data