Skip to content

Commit 0f777bf

Browse files
committed
fix: not workstation config return none
1 parent b4371fc commit 0f777bf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/backend/bisheng/api/services/workstation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ def update_config(cls, request: Request, login_user: UserPayload, data: Workstat
3333
return data
3434

3535
@classmethod
36-
def get_config(cls) -> WorkstationConfig:
36+
def get_config(cls) -> WorkstationConfig | None:
3737
""" 获取评测功能的默认模型配置 """
3838
ret = {}
3939
config = ConfigDao.get_config(ConfigKeyEnum.WORKSTATION)
4040
if config:
4141
ret = json.loads(config.value)
42-
return WorkstationConfig(**ret)
42+
return WorkstationConfig(**ret)
43+
return None
4344

4445
@classmethod
4546
async def uploadPersonalKnowledge(

0 commit comments

Comments
 (0)