Skip to content

Commit da9d96b

Browse files
committed
fix(import): Update CSV header check for ONSPD AUG 2025 format
The ONSPD CSV format has changed - the first column header is now 'pcd7' instead of 'pcd'. This updates the header detection to match the new format and prevent import errors.
1 parent e734336 commit da9d96b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/app/models/terminated_postcode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const seedPostcodes = async (filepath: string) => {
121121
return methods.csvSeed({
122122
filepath: [filepath],
123123
transform: (row: RowExtract) => {
124-
if (row[0] === "pcd") return null; //ignore header
124+
if (row[0] === "pcd7") return null; //ignore header
125125
if (row[4].length === 0) return null; // Skip if not terminated
126126
row.extract = (code: string) => extractOnspdVal(row, code); // Append extraction
127127
return ONSPD_COL_MAPPINGS.map((elem) => elem.method(row));

0 commit comments

Comments
 (0)