From: Mischa POSLAWSKY Date: Sun, 5 Jun 2022 23:24:40 +0000 (+0200) Subject: word: missing images in translations X-Git-Tag: v1.14~71 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/ac35af3aef24ba0b644f85b0fe98492e9065af1d word: missing images in translations --- 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;