Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne committed Nov 28, 2023
1 parent 8f2df91 commit 4b681cd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions embark/reporter/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from django.shortcuts import redirect
from django.contrib import messages
from django.template.loader import get_template
from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse
from django.http import HttpResponse, JsonResponse
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from django.urls import reverse
Expand Down Expand Up @@ -68,6 +68,7 @@ def html_report_path(request, analysis_id, html_path, html_file):
@require_http_methods(["GET"])
@login_required(login_url='/' + settings.LOGIN_URL)
def html_report_download(request, analysis_id, html_path, download_file): # TODO Needed for EMBA?
response = Http404("Resource not found")
if FirmwareAnalysis.objects.filter(id=analysis_id).exists():
analysis = FirmwareAnalysis.objects.get(id=analysis_id)
if analysis.hidden is False or analysis.user == request.user or request.user.is_superuser:
Expand All @@ -83,9 +84,7 @@ def html_report_download(request, analysis_id, html_path, download_file): # T
response['Content-Disposition'] = 'attachment; filename=' + os.path.basename(full_path)
logger.info("html_report - analysis_id: %s html_path: %s download_file: %s", analysis_id, html_path,
download_file)
return response
response = Http404("Resource not found")
return response
return response


@require_http_methods(["GET"])
Expand Down

0 comments on commit 4b681cd

Please sign in to comment.