Skip to content
Snippets Groups Projects
Commit bafeb6da authored by Jan Maximilian Michal's avatar Jan Maximilian Michal
Browse files

Reviewer 'Next' button gets the next feedback of the same type

parent bc75ac40
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ class FeedbackEdit(UpdateView): ...@@ -72,7 +72,7 @@ class FeedbackEdit(UpdateView):
# ugly needs patch # ugly needs patch
if 'Next' in self.request.POST['update']: if 'Next' in self.request.POST['update']:
if in_groups(self.request.user, ('Reviewers',)): if in_groups(self.request.user, ('Reviewers',)):
needs_review = Feedback.objects.filter(status=Feedback.NEEDS_REVIEW) needs_review = Feedback.objects.filter(status=Feedback.NEEDS_REVIEW, of_submission__type=form.instance.of_submission.type)
needs_review = needs_review[0] if needs_review else None needs_review = needs_review[0] if needs_review else None
if needs_review: if needs_review:
return HttpResponseRedirect(reverse('FeedbackEdit', args=(needs_review.slug,))) return HttpResponseRedirect(reverse('FeedbackEdit', args=(needs_review.slug,)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment