Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #743 from OpenTechFund/feature/dashboard-review-dr…
Browse files Browse the repository at this point in the history
…aft-show

Show submissions in Applications to review if review is in draft.
  • Loading branch information
frjo authored Jan 4, 2019
2 parents 43bb2b1 + a1f9db9 commit 543c87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opentech/apply/funds/models/submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.contrib.postgres.fields import JSONField
from django.core.exceptions import PermissionDenied
from django.db import models
from django.db.models import Count, IntegerField, OuterRef, Subquery, Sum
from django.db.models import Count, IntegerField, OuterRef, Subquery, Sum, Q
from django.db.models.expressions import RawSQL, OrderBy
from django.db.models.functions import Coalesce
from django.dispatch import receiver
Expand Down Expand Up @@ -81,7 +81,7 @@ def in_review(self):

def in_review_for(self, user, assigned=True):
user_review_statuses = get_review_statuses(user)
qs = self.filter(status__in=user_review_statuses).exclude(reviews__author=user)
qs = self.filter(Q(status__in=user_review_statuses), ~Q(reviews__author=user) | Q(reviews__is_draft=True))
if assigned:
qs = qs.filter(reviewers=user)
return qs
Expand Down

0 comments on commit 543c87d

Please sign in to comment.