Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit c96d966

Browse files
committed
Merge branch 'dq-leaderboard'
2 parents 00f9d5c + 87198e2 commit c96d966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CodeChallenge/api/vote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def get_contestants():
5555
.join(Answer.question) \
5656
.join(Answer.user) \
5757
.outerjoin(Answer.votes) \
58-
.filter(Question.rank == core.max_rank(), Answer.correct) \
58+
.filter(Question.rank == core.max_rank(), Answer.correct, Answer.disqualified.is_(None)) \
5959
.group_by(Answer.id)
6060

6161
if desc is not None:
@@ -247,7 +247,7 @@ def search():
247247
.join(Answer.question) \
248248
.join(Answer.user) \
249249
.outerjoin(Answer.votes) \
250-
.filter(Question.rank == core.max_rank(), Answer.correct,
250+
.filter(Question.rank == core.max_rank(), Answer.correct, Answer.disqualified.is_(None),
251251
or_(Users.username.ilike(keyword), Users.studentfirstname.ilike(keyword),
252252
Users.studentlastname.ilike(keyword))) \
253253
.group_by(Answer.id)\

0 commit comments

Comments
 (0)