Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Use _id instead of id
Browse files Browse the repository at this point in the history
  • Loading branch information
jecos committed Sep 10, 2019
1 parent 17f9667 commit 5c8e925
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def transform(event):
yield {
'_index': 'member',
'_type': 'member',
'_id': payload['id'],
'_id': payload['_id'],
'doc': {
'firstName': payload.get('firstName'),
'lastName': payload.get('lastName'),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def test_handler():
"messageId": "2e1424d4-f796-459a-8184-9c92662be6da",
"body": json.dumps(
{"id": "def", "firstName": "Jane", "lastName": "River", "interests": ["Volley Ball", "Natation"],
"virtualStudies": [{"id": "1", "name": "Virtual Study 1"},
{"id": "12", "name": "Virtual Study 2"}]}),
"virtualStudies": [{"_id": "1", "name": "Virtual Study 1"},
{"_id": "12", "name": "Virtual Study 2"}]}),
}
]
}, {})

0 comments on commit 5c8e925

Please sign in to comment.