Guard camera query against empty strings
This commit is contained in:
parent
fdc1d383c1
commit
a8906e273f
@ -242,8 +242,8 @@ const sqlGetUniqueCameras = async () => sql`
|
||||
SELECT DISTINCT make||' '||model as camera, make, model, COUNT(*)
|
||||
FROM photos
|
||||
WHERE hidden IS NOT TRUE
|
||||
AND make IS NOT NULL
|
||||
AND model IS NOT NULL
|
||||
AND trim(make) <> ''
|
||||
AND trim(model) <> ''
|
||||
GROUP BY make, model
|
||||
ORDER BY camera ASC
|
||||
`.then(({ rows }): Cameras => rows.map(({ make, model, count }) => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user