diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index cbde45d30..4c40a7e81 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -71,7 +71,9 @@ def dao_create_notification(notification): # notify-api-742 remove phone numbers from db notification.to = "1" notification.normalised_to = "1" - db.session.add(notification) + + # notify-api-1454 change to an upsert + db.session.merge(notification) def country_records_delivery(phone_prefix):