fix: exception during the conversion of the model to the RLDB model
This commit is contained in:
@@ -10,6 +10,7 @@ dependencies = [
|
||||
"fastapi>=0.118.3",
|
||||
"langchain==0.3.27",
|
||||
"langchain-openai==0.3.35",
|
||||
"pymysql>=1.1.2",
|
||||
"python-multipart>=0.0.20",
|
||||
"qiniu>=7.17.0",
|
||||
"sqlalchemy>=2.0.44",
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# created by mmmy on 2025-09-30
|
||||
|
||||
import json
|
||||
from typing import Dict
|
||||
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, func
|
||||
|
||||
from utils.rldb import RLDBBaseModel
|
||||
|
||||
class PeopleRLDBModel(RLDBBaseModel):
|
||||
@@ -95,8 +94,8 @@ class People:
|
||||
height=data.height,
|
||||
marital_status=data.marital_status,
|
||||
match_requirement=data.match_requirement,
|
||||
introduction=data.introduction,
|
||||
comments=data.comments,
|
||||
introduction=json.loads(data.introduction) if data.introduction else {},
|
||||
comments=json.loads(data.comments) if data.comments else {},
|
||||
cover=data.cover,
|
||||
)
|
||||
|
||||
@@ -127,7 +126,7 @@ class People:
|
||||
height=self.height,
|
||||
marital_status=self.marital_status,
|
||||
match_requirement=self.match_requirement,
|
||||
introduction=self.introduction,
|
||||
comments=self.comments,
|
||||
introduction=json.dumps(self.introduction, ensure_ascii=False),
|
||||
comments=json.dumps(self.comments, ensure_ascii=False),
|
||||
cover=self.cover,
|
||||
)
|
||||
11
uv.lock
generated
11
uv.lock
generated
@@ -1186,6 +1186,15 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pymysql"
|
||||
version = "1.1.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f5/ae/1fe3fcd9f959efa0ebe200b8de88b5a5ce3e767e38c7ac32fb179f16a388/pymysql-1.1.2.tar.gz", hash = "sha256:4961d3e165614ae65014e361811a724e2044ad3ea3739de9903ae7c21f539f03", size = 48258, upload-time = "2025-08-24T12:55:55.146Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/4c/ad33b92b9864cbde84f259d5df035a6447f91891f5be77788e2a3892bce3/pymysql-1.1.2-py3-none-any.whl", hash = "sha256:e6b1d89711dd51f8f74b1631fe08f039e7d76cf67a42a323d3178f0f25762ed9", size = 45300, upload-time = "2025-08-24T12:55:53.394Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "python-multipart"
|
||||
version = "0.0.20"
|
||||
@@ -1368,6 +1377,7 @@ dependencies = [
|
||||
{ name = "fastapi" },
|
||||
{ name = "langchain" },
|
||||
{ name = "langchain-openai" },
|
||||
{ name = "pymysql" },
|
||||
{ name = "python-multipart" },
|
||||
{ name = "qiniu" },
|
||||
{ name = "sqlalchemy" },
|
||||
@@ -1381,6 +1391,7 @@ requires-dist = [
|
||||
{ name = "fastapi", specifier = ">=0.118.3" },
|
||||
{ name = "langchain", specifier = "==0.3.27" },
|
||||
{ name = "langchain-openai", specifier = "==0.3.35" },
|
||||
{ name = "pymysql", specifier = ">=1.1.2" },
|
||||
{ name = "python-multipart", specifier = ">=0.0.20" },
|
||||
{ name = "qiniu", specifier = ">=7.17.0" },
|
||||
{ name = "sqlalchemy", specifier = ">=2.0.44" },
|
||||
|
||||
Reference in New Issue
Block a user