git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c64bae6
)
word: missing images in translations
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 5 Jun 2022 23:24:40 +0000
(
01:24
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 11 Jul 2022 02:02:34 +0000
(
04:02
+0200)
tools/word.pg.sql
patch
|
blob
|
history
diff --git
a/tools/word.pg.sql
b/tools/word.pg.sql
index 69ae03c0a071aea553d41846f1bc12278dc6d544..6647370b1d2c3a17994209ffec05cf3db01ee3c0 100644
(file)
--- 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;