diff --git a/flask_backend/repository/movies.py b/flask_backend/repository/movies.py index ef11500..4d153ab 100644 --- a/flask_backend/repository/movies.py +++ b/flask_backend/repository/movies.py @@ -32,7 +32,7 @@ def get_all_paginated( offset_value = (current_page - 1) * per_page # includes the `distinct` clause both on the select and the count queries # to avoid mismatches on pagination - query = db_session.query(Movie).join(Screening).distinct(Movie.id) + query = db_session.query(Movie).join(Screening).distinct() if include_drafts is False: query = query.filter(Screening.draft == False) # noqa: E712