1
0
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:
lins05
2012-08-09 17:08:50 +08:00
parent a99ed91e49
commit ecfb415ec4

View File

@@ -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]
for commit in commits:
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)
commit.revision_file_size = file_size
if file_id == current_file_id: