feat: enhance knowledge serialization to include workflow details
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled

This commit is contained in:
CaptainB 2025-11-28 19:11:39 +08:00
parent e0bbf06357
commit e9d4ac38ac
2 changed files with 6 additions and 2 deletions

View File

@ -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'))

View File

@ -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'
}