mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Order jobs by service
- newest first
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from sqlalchemy import desc
|
||||
from app import db
|
||||
from app.models import Job
|
||||
|
||||
@@ -7,7 +8,7 @@ def dao_get_job_by_service_id_and_job_id(service_id, job_id):
|
||||
|
||||
|
||||
def dao_get_jobs_by_service_id(service_id):
|
||||
return Job.query.filter_by(service_id=service_id).all()
|
||||
return Job.query.filter_by(service_id=service_id).order_by(desc(Job.created_at)).all()
|
||||
|
||||
|
||||
def dao_get_job_by_id(job_id):
|
||||
|
||||
Reference in New Issue
Block a user