# HG changeset patch # User Pawel Solyga # Date 1239810977 0 # Node ID 09ca8e6617283db00b5559764b8597592fdb1840 # Parent a1bda9afa5d02fca2ef2850ac430900285cfa687 Fix too long line and redefining variable 'review' from outer scope in soc.views.models.student_proposal module. Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r a1bda9afa5d0 -r 09ca8e661728 app/soc/views/models/student_proposal.py --- a/app/soc/views/models/student_proposal.py Wed Apr 15 08:01:17 2009 +0000 +++ b/app/soc/views/models/student_proposal.py Wed Apr 15 15:56:17 2009 +0000 @@ -897,7 +897,8 @@ mentor_names = [] for mentor_key in possible_mentors: - possible_mentor = mentor_logic.logic.getFromKeyName(mentor_key.id_or_name()) + possible_mentor = mentor_logic.logic.getFromKeyName( + mentor_key.id_or_name()) mentor_names.append(possible_mentor.name()) context['possible_mentors'] = ', '.join(mentor_names) @@ -920,9 +921,9 @@ # create a summary of all the private reviews review_summary = {} - for review in private_reviews: + for private_review in private_reviews: # make sure there is a reviewer - reviewer = review.reviewer + reviewer = private_review.reviewer if not reviewer: continue @@ -932,7 +933,7 @@ if reviewer_summary: # we already have something on file for this reviewer old_total_score = reviewer_summary['total_score'] - reviewer_summary['total_score'] = old_total_score + review.score + reviewer_summary['total_score'] = old_total_score + private_review.score old_total_comments = reviewer_summary['total_comments'] reviewer_summary['total_comments'] = old_total_comments + 1 @@ -940,7 +941,7 @@ review_summary[reviewer_key] = { 'name': reviewer.name(), 'total_comments': 1, - 'total_score': review.score} + 'total_score': private_review.score} context['review_summary'] = review_summary