From 62e628d5cbf29efd218b9cc744033a09c86154c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20K=C3=BCnzel?= <simonk@fsmpi.rwth-aachen.de> Date: Sat, 22 Jun 2024 15:51:15 +0200 Subject: [PATCH] Fix cutprogress and job worker filter sql --- cutprogress.py | 4 ++-- jobs.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cutprogress.py b/cutprogress.py index 1d8a238..b9e84ba 100644 --- a/cutprogress.py +++ b/cutprogress.py @@ -40,8 +40,8 @@ def cutprogress(user=None): lectures.course_id, lectures.time, lectures.title, - video_counts.videos_total, - video_counts.videos_visible + COALESCE(video_counts.videos_total, 0), + COALESCE(video_counts.videos_visible, 0) FROM lectures JOIN courses ON ( courses.id = lectures.course_id ) LEFT JOIN ( diff --git a/jobs.py b/jobs.py index b858365..82bdd3f 100644 --- a/jobs.py +++ b/jobs.py @@ -27,7 +27,7 @@ def jobs_overview(): condition_values = [] if filter['worker'] == '%': - condition = 'WHERE (type like ?) AND (worker IS NULL) AND (state like ?)' + condition = 'WHERE (type like ?) AND (state like ?)' condition_values.extend([filter['type'], filter['state']]) else: condition = 'WHERE (type like ?) AND (worker like ?) AND (state like ?)' -- GitLab