From fc1f706ae91c57e3fa86bc121c8825e906cfd467 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Oct 03 2023 13:23:02 +0000 Subject: outer joins for log query --- diff --git a/kojihub/scheduler.py b/kojihub/scheduler.py index 1275d3b..eb91f82 100644 --- a/kojihub/scheduler.py +++ b/kojihub/scheduler.py @@ -29,8 +29,9 @@ class LogMessagesQuery(QueryView): tables = ['scheduler_log_messages'] joinmap = { - 'task': 'task ON scheduler_log_messages.task_id = task.id', - 'host': 'host ON scheduler_log_messages.host_id = host.id', + # outer joins because these fields can be null + 'task': 'LEFT JOIN task ON scheduler_log_messages.task_id = task.id', + 'host': 'LEFT JOIN host ON scheduler_log_messages.host_id = host.id', } fieldmap = { 'id': ['scheduler_log_messages.id', None],