update version

This commit is contained in:
ktianc 2023-10-28 21:52:35 +08:00
parent dc34f018b3
commit 66806dac91
3 changed files with 4 additions and 8 deletions

View File

@ -11,7 +11,7 @@ from fastapi.security import OAuth2PasswordBearer
"""
系统版本
"""
VERSION = "3.2.0"
VERSION = "3.2.1"
"""安全警告: 不要在生产中打开调试运行!"""
DEBUG = False

View File

@ -544,14 +544,15 @@ class TestDal(DalBase):
async def test(self):
# print("-----------------------开始------------------------")
options = [joinedload(self.model.roles)]
v_where = [self.model.id == 1, models.VadminRole.id == 1]
v_join = [[self.model.roles]]
v_where = [self.model.id == 1, models.VadminRole.id == 1]
v_start_sql = select(self.model)
result, count = await self.get_datas(
v_start_sql=v_start_sql,
v_join=v_join,
v_options=options,
v_where=v_where
v_where=v_where,
v_return_count=True
)
if result:
print(result)

View File

@ -46,8 +46,6 @@ def register_exception(app: FastAPI):
# logger.error(exc.msg)
# 打印栈信息,方便追踪排查异常
logger.exception(exc)
print(exc.desc)
print(exc.msg)
return JSONResponse(
status_code=exc.status_code,
content={"message": exc.msg, "code": exc.code},
@ -63,7 +61,6 @@ def register_exception(app: FastAPI):
# logger.error(exc.detail)
# 打印栈信息,方便追踪排查异常
logger.exception(exc)
print(exc.detail)
return JSONResponse(
status_code=200,
content={
@ -82,7 +79,6 @@ def register_exception(app: FastAPI):
# logger.error(exc.errors())
# 打印栈信息,方便追踪排查异常
logger.exception(exc)
print(exc.errors())
msg = exc.errors()[0].get("msg")
if msg == "field required":
msg = "请求失败,缺少必填项!"
@ -116,7 +112,6 @@ def register_exception(app: FastAPI):
# logger.error(exc.__str__())
# 打印栈信息,方便追踪排查异常
logger.exception(exc)
print(exc.__str__())
return JSONResponse(
status_code=200,
content=jsonable_encoder(