Skip to content

Commit 6b41d8c

Browse files
committed
chore: remove unused CompareConstants import from document.py
1 parent e6dc404 commit 6b41d8c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

apps/knowledge/views/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from common.auth import TokenAuth
88
from common.auth.authentication import has_permissions
9-
from common.constants.permission_constants import PermissionConstants, CompareConstants
9+
from common.constants.permission_constants import PermissionConstants
1010
from common.result import result
1111
from knowledge.api.document import DocumentSplitAPI, DocumentBatchAPI, DocumentBatchCreateAPI, DocumentCreateAPI, \
1212
DocumentReadAPI, DocumentEditAPI, DocumentDeleteAPI, TableDocumentCreateAPI, QaDocumentCreateAPI, \

apps/knowledge/views/paragraph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class UnAssociation(APIView):
207207
authentication_classes = [TokenAuth]
208208

209209
@extend_schema(
210-
methods=['GET'],
210+
methods=['PUT'],
211211
summary=_('Disassociation issue'),
212212
description=_('Disassociation issue'),
213213
operation_id=_('Disassociation issue'), # type: ignore
@@ -216,7 +216,7 @@ class UnAssociation(APIView):
216216
tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore
217217
)
218218
@has_permissions(PermissionConstants.KNOWLEDGE_PARAGRAPH_EDIT.get_workspace_permission())
219-
def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
219+
def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
220220
return result.success(ParagraphSerializers.Association(
221221
data={
222222
'workspace_id': workspace_id,
@@ -231,7 +231,7 @@ class Association(APIView):
231231
authentication_classes = [TokenAuth]
232232

233233
@extend_schema(
234-
methods=['GET'],
234+
methods=['PUT'],
235235
summary=_('Related questions'),
236236
description=_('Related questions'),
237237
operation_id=_('Related questions'), # type: ignore
@@ -240,7 +240,7 @@ class Association(APIView):
240240
tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore
241241
)
242242
@has_permissions(PermissionConstants.KNOWLEDGE_PARAGRAPH_EDIT.get_workspace_permission())
243-
def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
243+
def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
244244
return result.success(ParagraphSerializers.Association(
245245
data={
246246
'workspace_id': workspace_id,

0 commit comments

Comments
 (0)