1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-22 10:28:21 +02:00

Fix formatting issues

This commit is contained in:
Alexandre Iooss
2020-02-18 21:14:29 +01:00
parent cd98f96cd0
commit e679a4b629
16 changed files with 63 additions and 72 deletions

View File

@ -75,12 +75,12 @@ class NotePolymorphicViewSet(viewsets.ModelViewSet):
note_type = self.request.query_params.get("type", None)
if note_type:
l = str(note_type).lower()
if "user" in l:
types = str(note_type).lower()
if "user" in types:
queryset = queryset.filter(polymorphic_ctype__model="noteuser")
elif "club" in l:
elif "club" in types:
queryset = queryset.filter(polymorphic_ctype__model="noteclub")
elif "special" in l:
elif "special" in types:
queryset = queryset.filter(
polymorphic_ctype__model="notespecial")
else:
@ -116,14 +116,14 @@ class AliasViewSet(viewsets.ModelViewSet):
note_type = self.request.query_params.get("type", None)
if note_type:
l = str(note_type).lower()
if "user" in l:
types = str(note_type).lower()
if "user" in types:
queryset = queryset.filter(
note__polymorphic_ctype__model="noteuser")
elif "club" in l:
elif "club" in types:
queryset = queryset.filter(
note__polymorphic_ctype__model="noteclub")
elif "special" in l:
elif "special" in types:
queryset = queryset.filter(
note__polymorphic_ctype__model="notespecial")
else: