Skip to content

Commit e98ecf4

Browse files
authored
fix: application knowledge list (#3368)
1 parent e7c0d8e commit e98ecf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/application/serializers/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def get_query_set(self, instance: Dict, workspace_manage: bool, is_x_pack_ee: bo
322322
return {'folder_query_set': folder_query_set,
323323
'application_query_set': application_query_set,
324324
'workspace_user_resource_permission_query_set': QuerySet(WorkspaceUserResourcePermission).filter(
325-
auth_target_type="KNOWLEDGE",
325+
auth_target_type="APPLICATION",
326326
workspace_id=workspace_id,
327327
user_id=user_id)} if (
328328
not workspace_manage and is_x_pack_ee) else {

apps/knowledge/serializers/knowledge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def get_query_set(self, workspace_manage, is_x_pack_ee):
160160
if not workspace_manage and is_x_pack_ee:
161161
query_set_dict['workspace_user_resource_permission_query_set'] = QuerySet(
162162
WorkspaceUserResourcePermission).filter(
163-
auth_target_type="",
163+
auth_target_type="KNOWLEDGE",
164164
workspace_id=workspace_id,
165165
user_id=self.data.get("user_id"))
166166
return query_set_dict

0 commit comments

Comments
 (0)