Fix aircraft db import
This commit is contained in:
@@ -116,7 +116,7 @@ export async function initAircraftDb() {
|
||||
});
|
||||
|
||||
insertMany(csv.map(row => ({
|
||||
icao: (row.icao || '').toUpperCase(),
|
||||
icao: (row.icao24 || '').toUpperCase(),
|
||||
built: row.built || null,
|
||||
categoryDescription: row.categoryDescription || null,
|
||||
country: row.country || null,
|
||||
@@ -277,7 +277,7 @@ export async function enrichAircraft(a) {
|
||||
categoryDescription = COALESCE(excluded.categoryDescription, categoryDescription),
|
||||
class = COALESCE(excluded.class, class)
|
||||
`).run({
|
||||
icao: icao,
|
||||
icao,
|
||||
registration: merged.registration || null,
|
||||
manufacturer: merged.manufacturer || null,
|
||||
aircraft: merged.aircraft || null,
|
||||
|
||||
Reference in New Issue
Block a user