From b3e6ad8c5c028bb37fa5fec71d4f0fb9a6c2c507 Mon Sep 17 00:00:00 2001 From: Milo Hyben Date: Thu, 25 Jul 2024 14:34:56 +1000 Subject: [PATCH] Fix for /api/v1alpha/batches/completed, picking only ROOT_JOB_GROUP when collecting batches and jobs. (#345) * Fix for /api/v1alpha/batches/completed, picking only ROOT_JOB_GROUP when collecting batches and jobs. * Removing DISTINCT --- batch/batch/front_end/front_end.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/batch/batch/front_end/front_end.py b/batch/batch/front_end/front_end.py index 16cedbebb26..bf5944897cb 100644 --- a/batch/batch/front_end/front_end.py +++ b/batch/batch/front_end/front_end.py @@ -389,12 +389,13 @@ async def _query_job_group_jobs( @auth.authenticated_users_only() async def get_completed_batches_ordered_by_completed_time(request, userdata): db = request.app['db'] - where_args = [userdata['username']] + where_args = [userdata['username'], ROOT_JOB_GROUP_ID] wheres = [ 'billing_project_users.`user` = %s', 'billing_project_users.billing_project = batches.billing_project', 'batches.time_completed IS NOT NULL', 'NOT deleted', + 'job_groups.job_group_id = %s', ] limit = 100