diff --git a/main.py b/main.py index 4550dddb670cf3a9e8befcc1e70bc33aa917193e..f54e90b344a73dc083675a10acb3b5d9763c9f03 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,7 @@ def process_user_name_updated_event(client: TypesenseClient, event: UserNameUpda document = { 'id': f'profile_{event.user.id}', 'type': 'profile', + 'volunteering_id': event.user.id, # TODO remove after dropping column from Typesense 'title_de': event.user.name, 'title_en': event.user.name, 'description_de': None, # TODO add on sending side diff --git a/test_main.py b/test_main.py index a5acd3d1a81990968d8255a10067107b788b3966..b3bd4ad604de7d9e33c1474006b2fa56abac087a 100644 --- a/test_main.py +++ b/test_main.py @@ -44,6 +44,7 @@ def test_user_name_updated(mock_client): mock_client.upsert.assert_called_with({ 'id': f'profile_{user_payload["id"]}', 'type': 'profile', + 'volunteering_id': user_payload["id"], # TODO remove after dropping column from Typesense 'title_de': user_payload['name'], 'title_en': user_payload['name'], 'description_de': None, # TODO add on sending side