Skip to content

Commit

Permalink
Merge pull request #3 from OCHA-DAP/dev
Browse files Browse the repository at this point in the history
HDX-10153 - add unsubscribe notification key to novu
  • Loading branch information
danmihaila authored Oct 10, 2024
2 parents c09e0fb + c06cc6e commit 216af1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ def process(dataset_id_list: Set[str], event: Dict):
# comment this line if you need to test local (without matching the dataset id to the list
if event and 'dataset_id' in event and event.get('dataset_id') in dataset_id_list:
change_summary = get_change_summary(event)
_dataset_id = event.get('dataset_id').replace('-', '_')
data_dict = {
'event': event,
'change_summary': change_summary
'change_summary': change_summary,
'unsubscribe_token_key': f'unsubscribe_token_{_dataset_id}'
}
push_notification_to_novu(data_dict)

Expand Down

0 comments on commit 216af1d

Please sign in to comment.