From: Christian Heller Date: Thu, 20 Feb 2025 18:05:05 +0000 (+0100) Subject: Fix /yt_result showing "linked queries" before query cut-off date. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/index.html?a=commitdiff_plain;h=HEAD;p=ytplom Fix /yt_result showing "linked queries" before query cut-off date. --- diff --git a/src/ytplom/http.py b/src/ytplom/http.py index b173a22..4986a3c 100644 --- a/src/ytplom/http.py +++ b/src/ytplom/http.py @@ -352,7 +352,9 @@ class _TaskHandler(PlomHttpHandler): def _send_yt_result(self) -> None: video_id = YoutubeId(self.path_toks[2]) with DbConn() as conn: - linked_queries = YoutubeQuery.get_all_for_video(conn, video_id) + linked_queries = [ + q for q in YoutubeQuery.get_all(conn) + if q.retrieved_at > self.server.config.queries_cutoff] try: video_data = YoutubeVideo.get_one(conn, video_id) except NotFoundException: