mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Search notification against normalised recipient with filter for status
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
from datetime import datetime
|
||||
import uuid
|
||||
|
||||
|
||||
from app.dao.jobs_dao import dao_create_job
|
||||
from app.models import (Service, User, Template, Notification, EMAIL_TYPE, LETTER_TYPE,
|
||||
SMS_TYPE, KEY_TYPE_NORMAL, Job, ServicePermission, ScheduledNotification)
|
||||
from app.models import (
|
||||
Service,
|
||||
User,
|
||||
Template,
|
||||
Notification,
|
||||
ScheduledNotification,
|
||||
ServicePermission,
|
||||
Job,
|
||||
EMAIL_TYPE,
|
||||
SMS_TYPE,
|
||||
KEY_TYPE_NORMAL,
|
||||
)
|
||||
from app.dao.users_dao import save_model_user
|
||||
from app.dao.notifications_dao import dao_create_notification, dao_created_scheduled_notification
|
||||
from app.dao.templates_dao import dao_create_template
|
||||
@@ -81,7 +92,8 @@ def create_notification(
|
||||
rate_multiplier=None,
|
||||
international=False,
|
||||
phone_prefix=None,
|
||||
scheduled_for=None
|
||||
scheduled_for=None,
|
||||
normalised_to=None
|
||||
):
|
||||
if created_at is None:
|
||||
created_at = datetime.utcnow()
|
||||
@@ -115,7 +127,8 @@ def create_notification(
|
||||
'job_row_number': job_row_number,
|
||||
'rate_multiplier': rate_multiplier,
|
||||
'international': international,
|
||||
'phone_prefix': phone_prefix
|
||||
'phone_prefix': phone_prefix,
|
||||
'normalised_to': normalised_to
|
||||
}
|
||||
notification = Notification(**data)
|
||||
dao_create_notification(notification)
|
||||
|
||||
Reference in New Issue
Block a user