diff --git a/apps/note/api/views.py b/apps/note/api/views.py index 14f64003..cace7e40 100644 --- a/apps/note/api/views.py +++ b/apps/note/api/views.py @@ -82,8 +82,7 @@ class NotePolymorphicViewSet(viewsets.ModelViewSet): elif "club" in types: queryset = queryset.filter(polymorphic_ctype__model="noteclub") elif "special" in types: - queryset = queryset.filter( - polymorphic_ctype__model="notespecial") + queryset = queryset.filter(polymorphic_ctype__model="notespecial") else: queryset = queryset.none() @@ -98,6 +97,8 @@ class AliasViewSet(viewsets.ModelViewSet): """ queryset = Alias.objects.all() serializer_class = AliasSerializer + filter_backends = [SearchFilter] + search_fields = ['$normalized_name', '$name', '$note__polymorphic_ctype__model', ] def get_queryset(self): """ diff --git a/templates/note/conso_form.html b/templates/note/conso_form.html index 7179fc58..35c2ab82 100644 --- a/templates/note/conso_form.html +++ b/templates/note/conso_form.html @@ -31,12 +31,9 @@