mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Renamed the header of the CSV to 'to' from 'number' to allow for email jobs
- added new columns to Job and Notification to capture the start/end dates accurately
This commit is contained in:
@@ -2,15 +2,13 @@ from app import db
|
||||
from app.models import Notification
|
||||
|
||||
|
||||
def save_notification(notification, update_dict={}):
|
||||
if update_dict:
|
||||
update_dict.pop('id', None)
|
||||
update_dict.pop('job', None)
|
||||
update_dict.pop('service', None)
|
||||
update_dict.pop('template', None)
|
||||
Notification.query.filter_by(id=notification.id).update(update_dict)
|
||||
else:
|
||||
db.session.add(notification)
|
||||
def dao_create_notification(notification):
|
||||
db.session.add(notification)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def dao_update_notification(notification):
|
||||
db.session.add(notification)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user