Skip to content

Commit e9d4ac3

Browse files
committed
feat: enhance knowledge serialization to include workflow details
1 parent e0bbf06 commit e9d4ac3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/knowledge/serializers/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def is_valid(self, *, raise_exception=False):
555555
super().is_valid(raise_exception=True)
556556
workspace_id = self.data.get('workspace_id')
557557
query_set = QuerySet(Knowledge).filter(id=self.data.get('knowledge_id'))
558-
if workspace_id:
558+
if workspace_id and workspace_id != 'None':
559559
query_set = query_set.filter(workspace_id=workspace_id)
560560
if not query_set.exists():
561561
raise AppApiException(500, _('Knowledge id does not exist'))

ui/src/views/knowledge-workflow/index.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,12 @@ const {
169169
params: { id, from, folderId },
170170
} = route as any
171171
const apiType = computed(() => {
172-
if (route.path.includes('resource-management')) {
172+
if (route.path.includes('shared')) {
173+
return 'systemShare'
174+
} else if (route.path.includes('resource-management')) {
173175
return 'systemManage'
176+
} else if (route.path.includes('share/')) {
177+
return 'workspaceShare'
174178
} else {
175179
return 'workspace'
176180
}

0 commit comments

Comments
 (0)