Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoutAllaert committed May 22, 2024
1 parent 7d1b94c commit 59c5e01
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/views/restrictie.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def restrictie_list(request, format=None):
Returns:
Response: Een http-respons met de opgevraagde of gemaakte restricties.
"""

if request.method == "GET":
restricties = Restrictie.objects.all()

Expand All @@ -33,9 +33,7 @@ def restrictie_list(request, format=None):
except NameError:
return Response(status=status.HTTP_400_BAD_REQUEST)

if "moet_slagen" in request.GET and request.GET.get(
"moet_slagen"
).lower() in [
if "moet_slagen" in request.GET and request.GET.get("moet_slagen").lower() in [
"true",
"false",
]:
Expand All @@ -45,7 +43,7 @@ def restrictie_list(request, format=None):

serializer = RestrictieSerializer(restricties, many=True)
return Response(serializer.data)

if has_permissions(request.user):
if request.method == "POST":
serializer = RestrictieSerializer(data=request.data)
Expand Down

0 comments on commit 59c5e01

Please sign in to comment.