fix support logging body names to not be 8-bit

Huh, some 8-bit species are broken and use the standard body ID!

This was causing our body name query to prioritize 8-bit for standard assets, as the alphabetically-first compatible color; but 8-bit isn't marked standard, so the function kept it labeled 8-bit.

This should fix it and show "Standard Draik" when deleting an asset off the standard draik body!
This commit is contained in:
Emi Matchu 2020-08-21 16:25:04 -07:00
parent 9f3fe820c2
commit 67e8d6a1f3
2 changed files with 6 additions and 6 deletions

View file

@ -48,7 +48,7 @@ Array [
], ],
Array [ Array [
"56", "56",
"8-bit Elephante", "Standard Elephante",
], ],
Array [ Array [
"66", "66",
@ -296,7 +296,7 @@ Array [
], ],
Array [ Array [
"132", "132",
"8-bit Draik", "Standard Draik",
], ],
Array [ Array [
"133", "133",
@ -468,7 +468,7 @@ Array [
], ],
Array [ Array [
"175", "175",
"8-bit Kyrii", "Standard Kyrii",
], ],
Array [ Array [
"176", "176",
@ -532,7 +532,7 @@ Array [
], ],
Array [ Array [
"191", "191",
"8-bit Ruki", "Standard Ruki",
], ],
Array [ Array [
"192", "192",
@ -616,7 +616,7 @@ Array [
], ],
Array [ Array [
"212", "212",
"8-bit Chia", "Standard Chia",
], ],
Array [ Array [
"213", "213",

View file

@ -99,7 +99,7 @@ async function loadBodyName(bodyId, db) {
ON pt.color_id = ct.color_id AND ct.locale = "en" ON pt.color_id = ct.color_id AND ct.locale = "en"
INNER JOIN colors c ON c.id = pt.color_id INNER JOIN colors c ON c.id = pt.color_id
WHERE pt.body_id = ? WHERE pt.body_id = ?
ORDER BY ct.name, st.name LIMIT 1;`, ORDER BY c.standard DESC, ct.name, st.name LIMIT 1;`,
[bodyId] [bodyId]
); );
const row = normalizeRow(rows[0]); const row = normalizeRow(rows[0]);