Skip to content

Commit d27e5b3

Browse files
committed
fix: model share
1 parent 15bfe23 commit d27e5b3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apps/models_provider/serializers/model_serializer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,11 @@ def model_list(self, workspace_id, with_valid=True):
344344
if with_valid:
345345
self.is_valid(raise_exception=True)
346346
queryset = self._build_query_params(workspace_id)
347-
model_workspace_authorization = DatabaseModelManage.get_model("model_workspace_authorization")
347+
get_authorized_model = DatabaseModelManage.get_model("get_authorized_model")
348348

349349
shared_queryset = QuerySet(Model).filter(workspace_id='None')
350-
if model_workspace_authorization is not None:
351-
shared_queryset = get_authorized_tool(QuerySet(Model), workspace_id,
352-
model_workspace_authorization=model_workspace_authorization)
350+
if get_authorized_model is not None:
351+
shared_queryset = get_authorized_model(QuerySet(Model), workspace_id)
353352

354353
# 构建共享模型和普通模型列表
355354
shared_model = [self._build_model_data(model) for model in shared_queryset.order_by("-create_time")]

0 commit comments

Comments
 (0)