Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove automatically suggested document for document that is already has review request (fixes #3211) #5425

Merged
merged 5 commits into from
Jul 23, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ietf/review/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,12 @@ def blocks(existing, request):
and existing.reviewassignment_set.filter(state_id__in=("assigned", "accepted")).exists()
and (not existing.requested_rev or existing.requested_rev == request.doc.rev))
request_closed = existing.state_id not in ('requested','assigned')
# Is there a review request for this document already in system
requested = existing.state_id in ('requested')
rjsparks marked this conversation as resolved.
Show resolved Hide resolved
# at least one assignment was completed for the requested version or the current doc version if no specific version was requested:
some_assignment_completed = existing.reviewassignment_set.filter(reviewed_rev=existing.requested_rev or existing.doc.rev, state_id='completed').exists()

return any([no_review_document, no_review_rev, pending, request_closed, some_assignment_completed])
return any([no_review_document, no_review_rev, pending, request_closed, requested, some_assignment_completed])

res = [r for r in requests.values()
if not any(blocks(e, r) for e in existing_requests[r.doc_id])]
Expand Down