Skip to content

Commit ccc0276

Browse files
committed
Update proposal filters
1 parent 4eb3cad commit ccc0276

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

junction/proposals/templatetags/proposal_filters.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import absolute_import, unicode_literals
33

4-
# Standard Library
54
import collections
65
import re
76

8-
# Third Party Stuff
97
from 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

1413
register = 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

0 commit comments

Comments
 (0)