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

Feature/sckan 333 #360

Merged
merged 11 commits into from
Nov 26, 2024
Merged
7 changes: 4 additions & 3 deletions backend/composer/api/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import django_filters
from django_filters import BaseInFilter, NumberFilter

from composer.enums import SentenceState, CSState
from composer.enums import SentenceState, CSState, NoteType
from composer.models import (
Sentence,
ConnectivityStatement,
Expand Down Expand Up @@ -218,9 +218,10 @@ def get_notes(queryset, name, value):
return queryset
system_user = User.objects.get(username="system")
combined_queryset = queryset.filter(
Q(user=system_user, note__icontains="invalid") |
(Q(user=system_user, note__icontains="invalid") |
Q(user=system_user, note__icontains="exported") |
~Q(user=system_user)
~Q(user=system_user)) &
~Q(type__in=[NoteType.TRANSITION])
Copy link
Contributor Author

@D-GopalKrishna D-GopalKrishna Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to - not show any transition related notes by default

)
return combined_queryset.distinct()

Expand Down