From ac35af3aef24ba0b644f85b0fe98492e9065af1d Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 6 Jun 2022 01:24:40 +0200 Subject: [PATCH] word: missing images in translations --- tools/word.pg.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/word.pg.sql b/tools/word.pg.sql index 69ae03c..6647370 100644 --- a/tools/word.pg.sql +++ b/tools/word.pg.sql @@ -74,7 +74,8 @@ CREATE OR REPLACE VIEW _word_ref AS coalesce(r.wptitle, w.wptitle) wptitle, coalesce(r.story, w.story ) story, r.creator, r.created, r.updated, - CASE WHEN r.image IS NULL THEN w.id ELSE r.id END id -- image id + CASE WHEN nullif(r.image, '{}') IS NOT NULL THEN r.id + WHEN nullif(w.image, '{}') IS NOT NULL THEN w.id END id -- image id FROM word r LEFT JOIN word w ON w.id = r.ref; -- 2.30.0