From 43e9109a715ee4ebaf7187a9e768f39e98e4fc62 Mon Sep 17 00:00:00 2001 From: Cal Ellowitz Date: Wed, 9 Oct 2024 15:18:35 +0200 Subject: [PATCH] order export rows --- commcare_connect/opportunity/export.py | 1 + 1 file changed, 1 insertion(+) diff --git a/commcare_connect/opportunity/export.py b/commcare_connect/opportunity/export.py index 3e1cece8..953ae53c 100644 --- a/commcare_connect/opportunity/export.py +++ b/commcare_connect/opportunity/export.py @@ -36,6 +36,7 @@ def export_user_visit_data( user_visits = user_visits.filter(visit_date__gte=date_range.get_cutoff_date()) if status and "all" not in status: user_visits = user_visits.filter(status__in=status) + user_visits = user_visits.order_by("visit_date") table = UserVisitTable(user_visits) exclude_columns = ("visit_date", "form_json", "details", "justification")