Skip to content

Commit

Permalink
Merge pull request #357 from RubanovDmitriy/main
Browse files Browse the repository at this point in the history
Bugfix for #343
  • Loading branch information
sgmdlt authored Nov 3, 2023
2 parents b45ba8e + 580a04b commit cec1355
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions contributors/views/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,18 @@ def get_context_data(self, *args, **kwargs):
contribution__id__in=all_contribution_id,
).distinct()

contribution_labels = ContributionLabel.objects.filter(
contribution__id__in=self.get_queryset(),
).distinct()
request_contribution_labels = self.request.GET.get(
'contribution_labels',
)

if request_contribution_labels:
contribution_labels = ContributionLabel.objects.exclude(
name__in=request_contribution_labels.split('.'),
).distinct()
else:
contribution_labels = ContributionLabel.objects.filter(
contribution__id__in=self.get_queryset(),
).distinct()

context = super().get_context_data(**kwargs)
context['all_contribution_labels'] = all_contribution_labels
Expand Down

0 comments on commit cec1355

Please sign in to comment.