sort Unknown appearances to the bottom of support

This commit is contained in:
Emi Matchu 2020-08-29 14:33:00 -07:00
parent d41f80518a
commit 5f3b627187

View file

@ -355,7 +355,7 @@ const buildPetStatesForPetTypeLoader = (db, loaders) =>
const [rows, _] = await db.execute(
`SELECT * FROM pet_states
WHERE pet_type_id IN (${qs})
ORDER BY mood_id ASC, female DESC, id DESC`,
ORDER BY (mood_id IS NULL) ASC, mood_id ASC, female DESC, id DESC`,
petTypeIds
);