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:
Martyn Inglis
2016-02-25 09:59:50 +00:00
parent b3884e2d6c
commit 10a764a2c1
16 changed files with 271 additions and 80 deletions

View File

@@ -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()