Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
JJFlorian committed Mar 20, 2024
1 parent 7cc6df6 commit e367c78
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit e367c78

Please sign in to comment.