1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-23 07:52:23 +00:00

Useless to search a note by its id (already implemented)

This commit is contained in:
Yohann D'ANELLO 2020-02-08 17:37:26 +01:00
parent dc87a5d77b
commit 2880b5b3c7

View File

@ -69,10 +69,6 @@ class NotePolymorphicViewSet(viewsets.ModelViewSet):
alias = self.request.query_params.get("alias", ".*")
queryset = queryset.filter(Q(alias__name__regex=alias) | Q(alias__normalized_name__regex=alias))
note_id = self.request.query_params.get("id", None)
if note_id:
queryset = queryset.filter(id=note_id)
note_type = self.request.query_params.get("type", None)
if note_type:
l = str(note_type).lower()