mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
update notification_history table from notification_dao create/update functions
please ensure that any changes to notifications table happen through either dao_create_notification or dao_update_notification. changed the notification status update triggered by the provider callbacks to ensure that sets updated_by and can update the history table. also re-added the character_count so we can reconstruct billing data if needed.
This commit is contained in:
@@ -17,6 +17,7 @@ from app.models import (
|
||||
ApiKey,
|
||||
Template,
|
||||
Job,
|
||||
NotificationHistory,
|
||||
Notification,
|
||||
Permission,
|
||||
User,
|
||||
@@ -97,6 +98,7 @@ def delete_service_and_all_associated_db_objects(service):
|
||||
_delete_commit(Permission.query.filter_by(service=service))
|
||||
_delete_commit(ApiKey.query.filter_by(service=service))
|
||||
_delete_commit(ApiKey.get_history_model().query.filter_by(service_id=service.id))
|
||||
_delete_commit(NotificationHistory.query.filter_by(service=service))
|
||||
_delete_commit(Notification.query.filter_by(service=service))
|
||||
_delete_commit(Job.query.filter_by(service=service))
|
||||
_delete_commit(Template.query.filter_by(service=service))
|
||||
|
||||
Reference in New Issue
Block a user