From f25ee6d198ec4b50b8641d61569bee3c285e3cfa Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 19 Feb 2018 10:56:56 +0100 Subject: [PATCH] add order for selecting objects --- billard/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/billard/tasks.py b/billard/tasks.py index 05c7d3d..50f3521 100644 --- a/billard/tasks.py +++ b/billard/tasks.py @@ -9,7 +9,7 @@ log = logging.getLogger(__name__) def process_client_data(): - data = ClientData.objects.all() + data = ClientData.objects.all().order_by('last_seen') for cd in data: client = Client.objects.get(uuid=cd.uuid) client.last_seen = cd.last_seen