mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-25 17:22:55 +00:00
feat: enhance knowledge serialization to include workflow details
This commit is contained in:
parent
e0bbf06357
commit
e9d4ac38ac
|
|
@ -555,7 +555,7 @@ class DocumentSerializers(serializers.Serializer):
|
|||
super().is_valid(raise_exception=True)
|
||||
workspace_id = self.data.get('workspace_id')
|
||||
query_set = QuerySet(Knowledge).filter(id=self.data.get('knowledge_id'))
|
||||
if workspace_id:
|
||||
if workspace_id and workspace_id != 'None':
|
||||
query_set = query_set.filter(workspace_id=workspace_id)
|
||||
if not query_set.exists():
|
||||
raise AppApiException(500, _('Knowledge id does not exist'))
|
||||
|
|
|
|||
|
|
@ -169,8 +169,12 @@ const {
|
|||
params: { id, from, folderId },
|
||||
} = route as any
|
||||
const apiType = computed(() => {
|
||||
if (route.path.includes('resource-management')) {
|
||||
if (route.path.includes('shared')) {
|
||||
return 'systemShare'
|
||||
} else if (route.path.includes('resource-management')) {
|
||||
return 'systemManage'
|
||||
} else if (route.path.includes('share/')) {
|
||||
return 'workspaceShare'
|
||||
} else {
|
||||
return 'workspace'
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue