Skip to content

Commit

Permalink
#1512: Force an inner join for rating and journal
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromsl authored and ajrbyers committed May 29, 2020
1 parent b746423 commit 9560633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/review/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def get_reviewer_candidates(article, user=None):
).prefetch_related(
prefetch_review_assignment,
'interest',
).annotate(
rating_average=Avg('reviewer__reviewerrating__rating'),
).filter(
reviewer__reviewerrating__assignment__article__journal=article.journal,
).annotate(
rating_average=Avg('reviewer__reviewerrating__rating'),
)

return reviewers
Expand Down

0 comments on commit 9560633

Please sign in to comment.