Fixed linked user resolution

This commit is contained in:
2026-10-04 18:04:36 +02:00
parent 84a171d4a4
commit c9deba0427
4 changed files with 110 additions and 24 deletions
@@ -181,7 +181,8 @@ export const normalizeOrganisation = (raw: any): Organisation => {
name: raw.name ?? raw.Name ?? null,
registrationNo: raw.registrationNo ?? raw.RegistrationNo ?? raw.regNo ?? raw.RegNo ?? null,
email: raw.email ?? raw.Email ?? null,
userId: raw.userId ?? raw.UserId ?? raw.organisationUser ?? raw.OrganisationUser ?? null,
userId: raw.userId ?? raw.UserId ?? raw.organisationUser ?? raw.OrganisationUser ?? raw.user_id ?? raw.linkedUser ?? raw.LinkedUser ?? null,
idNumber: raw.idNumber ?? raw.IdNumber ?? raw.id_number ?? null,
type: raw.type ?? raw.Type ?? raw.organisationType ?? raw.OrganisationType ?? 5,
status,
createdAt: raw.createdAt ?? raw.CreatedAt ?? new Date().toISOString(),