From 9db49b6b5eea5ac67cd1a4863ff029ad2c07e321 Mon Sep 17 00:00:00 2001 From: AdminWhaleFall Date: Tue, 5 Apr 2022 18:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20web=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flask_app/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flask_app/utils.py b/flask_app/utils.py index 86266d6..f7c5cc8 100644 --- a/flask_app/utils.py +++ b/flask_app/utils.py @@ -63,7 +63,8 @@ class API(BaseModel): :return: API basemodel """ if isinstance(self.data, str): - self.data = json.loads(self.data) + if self.data: + self.data = json.loads(self.data) if isinstance(self.header, str): if self.header: self.header = json.loads(self.header)