Skip to content

Commit e8cefd7

Browse files
committed
Fix export votes
1 parent bb38eef commit e8cefd7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

junction/proposals/dashboard.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def export_reviewer_votes(request, conference_slug):
301301
proposals_qs, key=lambda x: x.get_reviewer_votes_sum(), reverse=True)
302302
vote_values_list = ProposalSectionReviewerVoteValue.objects.order_by(
303303
'-vote_value')
304+
vote_values_list = [v.vote_value for v in vote_values_list]
304305
vote_values_desc = tuple(i.description
305306
for i in ProposalSectionReviewerVoteValue.objects.order_by('-vote_value'))
306307
header = ('Proposal Type', 'Title', 'Sum of reviewer votes', 'No. of reviewer votes') + \
@@ -327,11 +328,11 @@ def export_reviewer_votes(request, conference_slug):
327328
vote_details + (p.get_votes_count(), vote_comment,)
328329
if p.get_reviewer_votes_count_by_value(
329330
ProposalSectionReviewerVoteValue.objects.get(
330-
vote_value=ProposalReviewVote.NOT_ALLOWED)) > 0:
331+
vote_value=ProposalReviewVote.NOT_ALLOWED).vote_value) > 0:
331332
cell_format = book.add_format({'bg_color': 'red'})
332333
elif p.get_reviewer_votes_count_by_value(
333334
ProposalSectionReviewerVoteValue.objects.get(
334-
vote_value=ProposalReviewVote.MUST_HAVE)) > 2:
335+
vote_value=ProposalReviewVote.MUST_HAVE).vote_value) > 2:
335336
cell_format = book.add_format({'bg_color': 'green'})
336337
elif p.get_reviewer_votes_count() < 2:
337338
cell_format = book.add_format({'bg_color': 'yellow'})

junction/proposals/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ def proposals_to_review(request, conference_slug):
286286
if p.proposal_section == section]
287287
proposals_to_review.append(s_items(section, section_proposals))
288288

289-
form = ProposalsToReviewForm(conference=conference, proposal_sections=proposal_reviewer_sections)
289+
form = ProposalsToReviewForm(conference=conference,
290+
proposal_sections=proposal_reviewer_sections)
290291

291292
context = {
292293
'proposals_to_review': proposals_to_review,

0 commit comments

Comments
 (0)