From 4d7b095a8a344ccd6d1fe7fbf9fb5f2c7b7186af Mon Sep 17 00:00:00 2001 From: stitch1 Date: Fri, 26 Apr 2024 16:34:27 +0200 Subject: [PATCH] fix show latest report by using correct order --- dashboard/internet_nl_dashboard/logic/shared_report_lists.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/internet_nl_dashboard/logic/shared_report_lists.py b/dashboard/internet_nl_dashboard/logic/shared_report_lists.py index c32d37c6..9960e425 100644 --- a/dashboard/internet_nl_dashboard/logic/shared_report_lists.py +++ b/dashboard/internet_nl_dashboard/logic/shared_report_lists.py @@ -12,7 +12,7 @@ def get_latest_report_id_from_list_and_type(urllist_id: int, report_type: str = if report_type in {"web", "mail"}: report = report.filter(report_type=report_type) - found_report = report.first() + found_report = report.last() return ( {'latest_report_public_report_code': found_report.public_report_code}