1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 19:05:16 +00:00

Update share_links.py (#7691)

This commit is contained in:
Ranjiwei 2025-03-31 16:20:48 +08:00 committed by GitHub
parent 6d9d952079
commit 13098287d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -950,10 +950,7 @@ class ShareLinkDirents(APIView):
return api_error(status.HTTP_404_NOT_FOUND, error_msg)
try:
current_commit = seafile_api.get_commit_list(repo_id, 0, 1)[0]
dirent_list = seafile_api.list_dir_by_commit_and_path(repo_id,
current_commit.id,
path, -1, -1)
dirent_list = seafile_api.list_dir_by_path(repo_id, path)
except Exception as e:
logger.error(e)
error_msg = 'Internal Server Error'