mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 05:42:51 +00:00
fix: model share (#3402)
This commit is contained in:
parent
15bfe239a4
commit
f13a29a611
|
|
@ -344,12 +344,11 @@ class ModelSerializer(serializers.Serializer):
|
|||
if with_valid:
|
||||
self.is_valid(raise_exception=True)
|
||||
queryset = self._build_query_params(workspace_id)
|
||||
model_workspace_authorization = DatabaseModelManage.get_model("model_workspace_authorization")
|
||||
get_authorized_model = DatabaseModelManage.get_model("get_authorized_model")
|
||||
|
||||
shared_queryset = QuerySet(Model).filter(workspace_id='None')
|
||||
if model_workspace_authorization is not None:
|
||||
shared_queryset = get_authorized_tool(QuerySet(Model), workspace_id,
|
||||
model_workspace_authorization=model_workspace_authorization)
|
||||
if get_authorized_model is not None:
|
||||
shared_queryset = get_authorized_model(QuerySet(Model), workspace_id)
|
||||
|
||||
# 构建共享模型和普通模型列表
|
||||
shared_model = [self._build_model_data(model) for model in shared_queryset.order_by("-create_time")]
|
||||
|
|
|
|||
Loading…
Reference in New Issue