mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-30 00:27:42 +08:00
修复模型授权列表为空时页面白屏
This commit is contained in:
1 parent
726ad11086
commit
129f8b8fb8
1 file changed
+4
-4
@@ -112,8 +112,8 @@ type ApiModel = {
|
||||
}
|
||||
credit_multiplier: number
|
||||
authorization: {
|
||||
user_ids: string[]
|
||||
group_ids: string[]
|
||||
user_ids: string[] | null
|
||||
group_ids: string[] | null
|
||||
}
|
||||
enabled: boolean
|
||||
}
|
||||
@@ -138,8 +138,8 @@ function fromApiModel(model: ApiModel): Model {
|
||||
apiKeyConfigured: model.api_key_configured,
|
||||
multiplier: model.credit_multiplier,
|
||||
authorization: {
|
||||
groupIds: model.authorization.group_ids,
|
||||
memberIds: model.authorization.user_ids,
|
||||
groupIds: model.authorization.group_ids ?? [],
|
||||
memberIds: model.authorization.user_ids ?? [],
|
||||
},
|
||||
enabled: model.enabled,
|
||||
type: model.ownership_type,
|
||||
|
||||
Reference in new issue
Block a user