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):