mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
chore: remove unused CompareConstants import from document.py
This commit is contained in:
parent
e6dc404867
commit
6b41d8cff1
|
|
@ -6,7 +6,7 @@ from rest_framework.views import APIView
|
|||
|
||||
from common.auth import TokenAuth
|
||||
from common.auth.authentication import has_permissions
|
||||
from common.constants.permission_constants import PermissionConstants, CompareConstants
|
||||
from common.constants.permission_constants import PermissionConstants
|
||||
from common.result import result
|
||||
from knowledge.api.document import DocumentSplitAPI, DocumentBatchAPI, DocumentBatchCreateAPI, DocumentCreateAPI, \
|
||||
DocumentReadAPI, DocumentEditAPI, DocumentDeleteAPI, TableDocumentCreateAPI, QaDocumentCreateAPI, \
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class ParagraphView(APIView):
|
|||
authentication_classes = [TokenAuth]
|
||||
|
||||
@extend_schema(
|
||||
methods=['GET'],
|
||||
methods=['PUT'],
|
||||
summary=_('Disassociation issue'),
|
||||
description=_('Disassociation issue'),
|
||||
operation_id=_('Disassociation issue'), # type: ignore
|
||||
|
|
@ -216,7 +216,7 @@ class ParagraphView(APIView):
|
|||
tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore
|
||||
)
|
||||
@has_permissions(PermissionConstants.KNOWLEDGE_PARAGRAPH_EDIT.get_workspace_permission())
|
||||
def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
|
||||
def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
|
||||
return result.success(ParagraphSerializers.Association(
|
||||
data={
|
||||
'workspace_id': workspace_id,
|
||||
|
|
@ -231,7 +231,7 @@ class ParagraphView(APIView):
|
|||
authentication_classes = [TokenAuth]
|
||||
|
||||
@extend_schema(
|
||||
methods=['GET'],
|
||||
methods=['PUT'],
|
||||
summary=_('Related questions'),
|
||||
description=_('Related questions'),
|
||||
operation_id=_('Related questions'), # type: ignore
|
||||
|
|
@ -240,7 +240,7 @@ class ParagraphView(APIView):
|
|||
tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore
|
||||
)
|
||||
@has_permissions(PermissionConstants.KNOWLEDGE_PARAGRAPH_EDIT.get_workspace_permission())
|
||||
def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
|
||||
def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
|
||||
return result.success(ParagraphSerializers.Association(
|
||||
data={
|
||||
'workspace_id': workspace_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue