From ecfb415ec479b9075260c816b293534e4a66c5d8 Mon Sep 17 00:00:00 2001 From: lins05 Date: Thu, 9 Aug 2012 17:08:50 +0800 Subject: [PATCH] fixed a bug in list_file_revision --- views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views.py b/views.py index 1c7753b314..60b9ea9f77 100644 --- a/views.py +++ b/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] 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: