Skip to content

Commit

Permalink
Fix broken pagination query
Browse files Browse the repository at this point in the history
  • Loading branch information
buehlefs committed Sep 18, 2024
1 parent 5b81555 commit 6282f54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qhana_plugin_registry/db/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,16 @@ def get_page_info(
cursor_row_subq = (
DB.session.query(
row_numbers.label("row"),
cursor_column,
cursor_column.label("cursor_id"),
)
.filter(*query_filter)
.subquery()
)

cursor_row_cte: CTE = (
select(cursor_row_subq.c.row)
.filter(cursor_column == cursor)
.filter(cursor_row_subq.c.cursor_id == cursor)
.distinct()
.cte("cursor_row")
)
cursor_row = cursor_row_cte.c.row
Expand Down

0 comments on commit 6282f54

Please # to comment.