mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
fixed a bug in list_file_revision
This commit is contained in:
3
views.py
3
views.py
@@ -1630,7 +1630,8 @@ def render_file_revisions (request, repo_id):
|
|||||||
current_file_id = get_file_revision_id_size (current_commit.id, target_file)[0]
|
current_file_id = get_file_revision_id_size (current_commit.id, target_file)[0]
|
||||||
for commit in commits:
|
for commit in commits:
|
||||||
file_id, file_size = get_file_revision_id_size (commit.id, target_file)
|
file_id, file_size = get_file_revision_id_size (commit.id, target_file)
|
||||||
if not file_id or not file_size:
|
if not file_id or file_size is None:
|
||||||
|
# do not use no file_size, since it's ok to have file_size = 0
|
||||||
return render_error(request)
|
return render_error(request)
|
||||||
commit.revision_file_size = file_size
|
commit.revision_file_size = file_size
|
||||||
if file_id == current_file_id:
|
if file_id == current_file_id:
|
||||||
|
Reference in New Issue
Block a user