Skip to content

Commit

Permalink
One more fix for the SQL, job_groups table have time_completed as wel…
Browse files Browse the repository at this point in the history
…l causing Error: Column 'time_completed' in where clause is ambiguous. (#340)
  • Loading branch information
milo-hyben authored May 29, 2024
1 parent 4fb0e47 commit 1ced860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions batch/batch/front_end/front_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ async def get_completed_batches_ordered_by_completed_time(request, userdata):
last_completed_timestamp = request.query.get('last_completed_timestamp')
if last_completed_timestamp:
where_args.append(int(last_completed_timestamp))
wheres.append('time_completed < %s')
wheres.append('batches.time_completed < %s')

sql = f"""
SELECT batches.*,
Expand Down Expand Up @@ -441,7 +441,7 @@ async def get_completed_batches_ordered_by_completed_time(request, userdata):
) AS cost_t ON TRUE
WHERE
{' AND '.join(wheres)}
ORDER BY time_completed DESC
ORDER BY batches.time_completed DESC
LIMIT %s;
"""

Expand Down

0 comments on commit 1ced860

Please sign in to comment.