mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
notify-api-317 fix the scrubbing of pii for successful notifications
This commit is contained in:
@@ -272,7 +272,7 @@ def _filter_query(query, filter_dict=None):
|
||||
|
||||
|
||||
@autocommit
|
||||
def sanitize_notifications_by_id(
|
||||
def sanitize_successful_notification_by_id(
|
||||
notification_id
|
||||
):
|
||||
# TODO what to do for international?
|
||||
@@ -280,12 +280,10 @@ def sanitize_notifications_by_id(
|
||||
Notification.query.filter(
|
||||
Notification.id.in_([notification_id]),
|
||||
).update(
|
||||
{'to': phone_prefix, 'normalised_to': phone_prefix},
|
||||
{'to': phone_prefix, 'normalised_to': phone_prefix, 'status': 'delivered'},
|
||||
synchronize_session=False
|
||||
)
|
||||
|
||||
db.session.commit()
|
||||
|
||||
|
||||
@autocommit
|
||||
def insert_notification_history_delete_notifications(
|
||||
|
||||
Reference in New Issue
Block a user