Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ShishckovA authored and startsev2000 committed Nov 1, 2023
1 parent 23b2663 commit 258dce4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions back-end/src/ams/views/applicants.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def generate_excel_report(
excel_generator: tp.Callable[[QuerySet, QuerySet], Path],
) -> tp.Union[FileResponse, Response]:
if (
"campus" not in request.query_params
or request.query_params["campus"] not in Campus
"campus" not in request.query_params
or request.query_params["campus"] not in Campus
):
return Response(status=status.HTTP_400_BAD_REQUEST)

Expand All @@ -260,15 +260,11 @@ def generate_excel_report(
response_file_name = f"{campus_name}.xlsx"

file = open(path, "rb")
return FileResponse(
file,
filename=response_file_name
)
return FileResponse(file, filename=response_file_name)

def generate_docs(
self,
) -> Response:

applicants = self.get_queryset()
data = [
ApplicantSerializer(instance=applicant).data for applicant in applicants
Expand Down

0 comments on commit 258dce4

Please sign in to comment.