Skip to content

Commit

Permalink
fix(users): skip users without email addresses
Browse files Browse the repository at this point in the history
This commit skips users in the database without email addresses.

Closes #6322.
  • Loading branch information
jniles committed Jan 28, 2022
1 parent 774b12a commit 2fb4867
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/controllers/admin/odk-central.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ async function syncUsersWithCentral() {
SELECT user.id, user.display_name, user.email
FROM user WHERE user.deactivated <> 1 AND user.id NOT IN (
SELECT bhima_user_id FROM odk_user
) AND user.id IN (SELECT user_id FROM depot_permission);
) AND user.id IN (SELECT user_id FROM depot_permission)
AND user.email IS NOT NULL;
`);

// TODO(@jniles) LIMIT 1 is a hack.
Expand Down

0 comments on commit 2fb4867

Please sign in to comment.