From a4b71aa73c16aa99a47e4f683082524739e4c158 Mon Sep 17 00:00:00 2001 From: snowy Date: Mon, 3 Jun 2024 17:58:46 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20orm=E6=A1=86=E6=9E=B6=E5=9C=A8=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=AD=97=E6=AE=B5=E5=80=BC=E6=97=B6=E9=81=87=E5=88=B0?= =?UTF-8?q?None=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/utils/base/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liteyuki/utils/base/data.py b/liteyuki/utils/base/data.py index 4ba03f4..5cf7363 100644 --- a/liteyuki/utils/base/data.py +++ b/liteyuki/utils/base/data.py @@ -155,7 +155,7 @@ class Database: if field.startswith(self.BYTES_PREFIX): - new_obj[field.replace(self.BYTES_PREFIX, "")] = self._load(pickle.loads(value) if value else value) # 从value字段可能为None,fix at 2024/6/13 + new_obj[field.replace(self.BYTES_PREFIX, "")] = self._load(pickle.loads(value) if isinstance(value, bytes) else value) # 从value字段可能为None,fix at 2024/6/13 elif field.startswith(self.FOREIGN_KEY_PREFIX):