From 842d2acb26b312b2a9415e8fa097cd4acb24f6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AC=A2=E4=B9=90=E9=A9=AC?= <38058090+SkywalkerSpace@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:48:10 +0800 Subject: [PATCH] create sdoc gen doc_uuid (#5886) --- seahub/api2/endpoints/file.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/seahub/api2/endpoints/file.py b/seahub/api2/endpoints/file.py index dcbd82839b..c76077e0d7 100644 --- a/seahub/api2/endpoints/file.py +++ b/seahub/api2/endpoints/file.py @@ -279,6 +279,10 @@ class FileView(APIView): new_file_path = posixpath.join(parent_dir, new_file_name) file_info = self.get_file_info(username, repo_id, new_file_path) + # gen doc_uuid + if new_file_name.endswith('.sdoc'): + doc_uuid = get_seadoc_file_uuid(repo, new_file_path) + file_info['doc_uuid'] = doc_uuid return Response(file_info) if operation == 'rename':