Skip to content

Commit 0c40224

Browse files
r350178982AlexCXC
authored andcommitted
fix-del-files
1 parent 7237633 commit 0c40224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dtable_events/tasks/dtable_upload_link_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from collections import defaultdict
55
from datetime import datetime, timedelta
66
from threading import Thread
7+
import json
78

89
from apscheduler.schedulers.blocking import BlockingScheduler
910
from sqlalchemy import text
@@ -63,8 +64,7 @@ def handle_flags(self, session):
6364
break
6465
f_offset += f_limit
6566
logger.debug('repo: %s dtable: %s to delete files: %s', repo_id, dtable_uuid, len(to_delete_files))
66-
for file in to_delete_files:
67-
seafile_api.del_file(repo_id, public_forms_path, file, '')
67+
seafile_api.del_file(repo_id, public_forms_path, json.dumps(to_delete_files), '')
6868
except Exception as e:
6969
logger.exception('repo: %s handle upload flags error: %s', repo_id, e)
7070
if len(results) < limit:

0 commit comments

Comments
 (0)