File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
services/director-v2/src/simcore_service_director_v2 Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,6 @@ async def list_computations_latest_iteration_tasks_page(
129129 comp_tasks_repo = CompTasksRepository .instance (db_engine = app .state .engine )
130130 comp_runs_repo = CompRunsRepository .instance (db_engine = app .state .engine )
131131
132- # Get latest
133-
134132 total , comp_tasks = await comp_tasks_repo .list_computational_tasks_rpc_domain (
135133 project_ids = project_ids ,
136134 offset = offset ,
Original file line number Diff line number Diff line change @@ -245,17 +245,16 @@ async def list_for_user__only_latest_iterations(
245245 ]
246246 )
247247 )
248+ _latest_runs_subquery = _latest_runs .subquery ().alias ("latest_runs" )
248249
249250 base_select_query = sa .select (
250251 * self ._COMPUTATION_RUNS_RPC_GET_COLUMNS
251252 ).select_from (
252- _latest_runs . subquery () .join (
253+ _latest_runs_subquery .join (
253254 comp_runs ,
254255 sa .and_ (
255- comp_runs .c .project_uuid
256- == literal_column ("latest_runs.project_uuid" ),
257- comp_runs .c .iteration
258- == literal_column ("latest_runs.latest_iteration" ),
256+ comp_runs .c .project_uuid == _latest_runs_subquery .c .project_uuid ,
257+ comp_runs .c .iteration == _latest_runs_subquery .c .latest_iteration ,
259258 ),
260259 )
261260 )
You can’t perform that action at this time.
0 commit comments