Skip to content

Commit 74a525e

Browse files
feat: allow users to request peer review from themselves (#14946)
Remove the exclusion of the current user from the reviewer dropdown in ReviewFindingForm so users can self-assign as reviewer.
1 parent 3547ece commit 74a525e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

dojo/forms.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,16 +2176,13 @@ class ReviewFindingForm(forms.Form):
21762176

21772177
def __init__(self, *args, **kwargs):
21782178
finding = kwargs.pop("finding", None)
2179-
user = kwargs.pop("user", None)
2179+
kwargs.pop("user", None)
21802180
super().__init__(*args, **kwargs)
21812181
# Get the list of users
21822182
if finding is not None:
21832183
users = get_authorized_users_for_product_and_product_type(None, finding.test.engagement.product, "edit")
21842184
else:
21852185
users = get_authorized_users("edit").filter(is_active=True)
2186-
# Remove the current user
2187-
if user is not None:
2188-
users = users.exclude(id=user.id)
21892186
# Save a copy of the original query to be used in the validator
21902187
self.reviewer_queryset = users
21912188
# Set the users in the form

0 commit comments

Comments
 (0)