File tree Expand file tree Collapse file tree
junction/proposals/templatetags Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22from __future__ import absolute_import , unicode_literals
33
4- # Standard Library
54import collections
65import re
76
8- # Third Party Stuff
97from django import template
8+ from junction .base .constants import PSRVotePhase
9+ from junction .proposals .models import ProposalComment , ProposalSectionReviewer , \
10+ ProposalSectionReviewerVote
1011
11- # Junction Stuff
12- from junction .proposals .models import ProposalComment , ProposalSectionReviewer , ProposalSectionReviewerVote
1312
1413register = template .Library ()
1514
@@ -20,14 +19,17 @@ def reviewer_comments(proposal, user):
2019
2120
2221@register .filter (name = 'is_reviewer_voted' )
23- def is_reviewer_voted (proposal , user ):
22+ def is_reviewer_voted (proposal , user , phase = None ):
23+ if not phase :
24+ phase = PSRVotePhase .PRIMARY
2425 try :
2526 vote = ProposalSectionReviewerVote .objects .get (
2627 proposal = proposal ,
2728 voter = ProposalSectionReviewer .objects .get (
2829 conference_reviewer__reviewer = user ,
2930 conference_reviewer__conference = proposal .conference ,
3031 proposal_section = proposal .proposal_section ),
32+ phase = phase ,
3133 )
3234 except ProposalSectionReviewerVote .DoesNotExist :
3335 vote = None
You can’t perform that action at this time.
0 commit comments