From b8cfaf02f6b7f21f6f379288d21be6364a5a8b3c Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Thu, 13 Apr 2017 12:52:30 +0100 Subject: [PATCH] Ordered the query - ambiguous orders made tests flaky --- app/dao/jobs_dao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dao/jobs_dao.py b/app/dao/jobs_dao.py index a2b2390b0..6d4a8d6cb 100644 --- a/app/dao/jobs_dao.py +++ b/app/dao/jobs_dao.py @@ -43,7 +43,7 @@ def all_notifications_are_created_for_job(job_id): @statsd(namespace="dao") def dao_get_all_notifications_for_job(job_id): - return db.session.query(Notification).filter(Notification.job_id == job_id).all() + return db.session.query(Notification).filter(Notification.job_id == job_id).order_by(Notification.created_at).all() def dao_get_job_by_service_id_and_job_id(service_id, job_id):