created dao to get notifications by references

This commit is contained in:
venusbb
2017-12-01 09:31:03 +00:00
parent f32051194d
commit a0fe5c6971
2 changed files with 20 additions and 1 deletions

View File

@@ -482,6 +482,13 @@ def dao_get_notifications_by_to_field(service_id, search_term, statuses=None):
return results
@statsd(namespace="dao")
def dao_get_notifications_by_reference(references):
return Notification.query.filter(
Notification.reference.in_(references)
).all()
@statsd(namespace="dao")
def dao_created_scheduled_notification(scheduled_notification):
db.session.add(scheduled_notification)