Allow logs from app_id=0 (jobs)

This commit is contained in:
Jan Kvetina 2022-01-24 21:14:40 +01:00
parent 69199afb5f
commit dee5834581
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ FROM logs l
JOIN x
ON l.created_at >= x.today
AND l.created_at < x.today + 1
AND l.app_id = x.app_id
AND l.app_id IN (x.app_id, 0)
AND l.log_id > NVL(x.recent_log_id, 0)
AND l.flag = NVL(x.flag, l.flag)
AND l.page_id = NVL(x.page_id, l.page_id)

View File

@ -17,7 +17,7 @@ SELECT
FROM logs l
CONNECT BY l.log_parent = PRIOR l.log_id
START WITH l.log_id = app.get_log_tree_id()
AND l.app_id = app.get_app_id()
AND l.app_id IN (app.get_app_id(), 0)
ORDER SIBLINGS BY l.log_id;
--
COMMENT ON TABLE logs_tree IS '[CORE - DASHBOARD] All messages related to selected tree id (`app.get_log_tree_id()`)';