From 294b189a92b2b8b03fc75d2a3d505fb2cdf346f1 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 1 Aug 2017 07:48:41 +0200 Subject: [PATCH] add order by --- billard/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/billard/tasks.py b/billard/tasks.py index e3194f0..fceae52 100644 --- a/billard/tasks.py +++ b/billard/tasks.py @@ -10,7 +10,7 @@ log = logging.getLogger(__name__) @shared_task def process_location_data(): - data = LocationData.objects.filter(processed=False) + data = LocationData.objects.filter(processed=False).order_by('tst') for ld in data: cli = Client.objects.filter(uuid=ld.client_id, desks__desk_no=ld.desk_no) if cli.count() < 1: