fix: refactor delete method in DocumentSerializers for improved clarity
--bug=1060005 --user=刘瑞斌 【资源管理】知识库-删除文档报错 https://www.tapd.cn/62980211/s/1749123
This commit is contained in:
parent
9a626efe35
commit
f668daa902
@ -662,6 +662,7 @@ class DocumentSerializers(serializers.Serializer):
|
|||||||
|
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
self.is_valid(raise_exception=True)
|
||||||
document_id = self.data.get("document_id")
|
document_id = self.data.get("document_id")
|
||||||
source_file_ids = [
|
source_file_ids = [
|
||||||
doc['meta'].get(
|
doc['meta'].get(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user