Skip to content

Commit 50fa3d6

Browse files
committed
Merge branch 'develop' into pm-2539
2 parents 675dde2 + 199994e commit 50fa3d6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/scripts/migrate-dynamo-data.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,9 @@ async function importElasticSearchMember (filename, dateFilter = null) {
17601760
})
17611761

17621762
const dataObj = await fixMemberUpdateData(dataItem._source, dbItem || {})
1763+
if (!dataObj) {
1764+
continue
1765+
}
17631766

17641767
await updateMembersWithTraitsAndSkills(dataObj)
17651768
total += 1

src/services/SearchService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async function searchMembers (currentUser, query) {
156156
if (currentUser == null) {
157157
throw new errors.UnauthorizedError('Authentication token is required to query users by email')
158158
}
159-
if (!helper.hasSearchByEmailRole(currentUser)) {
159+
if (!currentUser.isMachine && !helper.hasSearchByEmailRole(currentUser)) {
160160
throw new errors.BadRequestError('Admin role is required to query users by email')
161161
}
162162
}

0 commit comments

Comments
 (0)