From 22c05cc9c172fbc5c251e290c0b21e0b0d3737c1 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 31 Aug 2023 18:39:23 +0200 Subject: [PATCH] Fix yapf errors --- backend/samfundet/serializers.py | 6 ++++-- backend/samfundet/views.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/samfundet/serializers.py b/backend/samfundet/serializers.py index 97f13789b..f0c9d04bc 100644 --- a/backend/samfundet/serializers.py +++ b/backend/samfundet/serializers.py @@ -512,14 +512,16 @@ class Meta: 'interview_location', ] + class ApplicantInfoSerializer(serializers.ModelSerializer): - + class Meta: model = User fields = ['id', 'first_name', 'last_name', 'email'] + class RecruitmentAdmissionForGangSerializer(serializers.ModelSerializer): - user = ApplicantInfoSerializer(read_only = True) + user = ApplicantInfoSerializer(read_only=True) class Meta: model = RecruitmentAdmission diff --git a/backend/samfundet/views.py b/backend/samfundet/views.py index daeca6a0b..ebfe45080 100644 --- a/backend/samfundet/views.py +++ b/backend/samfundet/views.py @@ -1,5 +1,4 @@ from typing import Type - from django.contrib.auth import login, logout from django.contrib.auth.models import Group from django.db.models import QuerySet @@ -447,6 +446,7 @@ class RecruitmentPositionView(ModelViewSet): serializer_class = RecruitmentPositionSerializer queryset = RecruitmentPosition.objects.all() + @method_decorator(ensure_csrf_cookie, 'dispatch') class RecruitmentAdmissionView(ModelViewSet): permission_classes = [AllowAny]