From e367c7889e199b0bd44e948d4b1f4b2116e6a2ac Mon Sep 17 00:00:00 2001 From: Florian Knappers <73856313+JJFlorian@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:07:13 +0100 Subject: [PATCH] precommit --- api/views.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/views.py b/api/views.py index b085c88..543249c 100644 --- a/api/views.py +++ b/api/views.py @@ -1,7 +1,5 @@ from django.contrib.auth import logout -from django.http import HttpResponseRedirect from django.shortcuts import redirect -from django.urls import reverse from django_filters.rest_framework import DjangoFilterBackend from rest_framework import generics, permissions, status, views from rest_framework.response import Response @@ -103,7 +101,9 @@ def post(self, request): Initialize an import task by posting a BRO object. """ - serializer = serializers.ImportTaskSerializer(data=request.data, context={'request': request}) + serializer = serializers.ImportTaskSerializer( + data=request.data, context={"request": request} + ) if serializer.is_valid(): import_task_instance = serializer.save() @@ -191,7 +191,9 @@ def post(self, request): Initialize an upload task by posting the bro_domain, registration_type, request_type, and the sourcedocument_data """ - serializer = serializers.UploadTaskSerializer(data=request.data, context={'request': request}) + serializer = serializers.UploadTaskSerializer( + data=request.data, context={"request": request} + ) if serializer.is_valid(): upload_task_instance: models.UploadTask = serializer.save()