diff --git a/service/src/storage/mongo.ts b/service/src/storage/mongo.ts index 5ebff659..9dab4e7b 100644 --- a/service/src/storage/mongo.ts +++ b/service/src/storage/mongo.ts @@ -435,7 +435,7 @@ export async function createUser(email: string, password: string, roles?: UserRo if (roles && roles.includes(UserRole.Admin)) userInfo.status = Status.Normal // Using `if (status !== null)` check because status.Normal value is 0, so `if (status)` would fail when status is Normal - if (status !== null) + if (status != null) userInfo.status = status userInfo.roles = roles