diff --git a/backend/services/auth-service/src/infrastructure/messaging/cdc/legacy-user-cdc.consumer.ts b/backend/services/auth-service/src/infrastructure/messaging/cdc/legacy-user-cdc.consumer.ts index 5bcc92b1..4a5dc495 100644 --- a/backend/services/auth-service/src/infrastructure/messaging/cdc/legacy-user-cdc.consumer.ts +++ b/backend/services/auth-service/src/infrastructure/messaging/cdc/legacy-user-cdc.consumer.ts @@ -137,8 +137,8 @@ export class LegacyUserCdcConsumer implements OnModuleInit, OnModuleDestroy { await this.prisma.syncedLegacyUser.upsert({ where: { legacyId: BigInt(user.user_id) }, update: { - phone: user.phone_number || null, - passwordHash: user.password_hash || null, + phone: user.phone_number ?? undefined, + passwordHash: user.password_hash ?? undefined, accountSequence: user.account_sequence, status: user.status, sourceSequenceNum: sequenceNum, @@ -146,8 +146,8 @@ export class LegacyUserCdcConsumer implements OnModuleInit, OnModuleDestroy { }, create: { legacyId: BigInt(user.user_id), - phone: user.phone_number || null, - passwordHash: user.password_hash || null, + phone: user.phone_number ?? null, + passwordHash: user.password_hash ?? null, accountSequence: user.account_sequence, status: user.status, legacyCreatedAt: new Date(user.registered_at),