This commit is contained in:
dx-tan 2024-03-29 17:47:10 +07:00
parent 4e48909e88
commit f7dadf2cb6

View File

@ -632,7 +632,7 @@ class AccuracyViewSet(viewsets.ViewSet):
target_timezone = pytz.timezone(settings.TIME_ZONE) target_timezone = pytz.timezone(settings.TIME_ZONE)
if not report.S3_file_name: if not report.S3_file_name:
raise NotFoundException(excArgs="S3 file name") raise NotFoundException(excArgs="S3 file name")
if not report.S3_dashboard_file_name: if not report.S3_dashboard_file_name and request.query_params["report_expression"] != "detail":
raise NotFoundException(excArgs="S3 dashboard file name") raise NotFoundException(excArgs="S3 dashboard file name")
file_name = report.S3_file_name if request.query_params["report_expression"] == "detail" else report.S3_dashboard_file_name file_name = report.S3_file_name if request.query_params["report_expression"] == "detail" else report.S3_dashboard_file_name