feat(persons): normalize SKIP→UNKNOWN in edit-route load function

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-25 21:28:10 +02:00
committed by marcel
parent b8dcb2d3f4
commit ac8d0d5796
2 changed files with 36 additions and 1 deletions

View File

@@ -22,7 +22,9 @@ export async function load({ params, fetch, locals }) {
throw error(result.response.status, getErrorMessage(code));
}
return { person: result.data!, aliases: aliasesResult.data ?? [] };
const person = result.data!;
const personType = person.personType === 'SKIP' ? 'UNKNOWN' : person.personType;
return { person: { ...person, personType }, aliases: aliasesResult.data ?? [] };
}
export const actions = {