mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-03 13:18:32 -04:00
add org invite template to db
This commit is contained in:
@@ -188,7 +188,7 @@ def delete_invitations():
|
||||
deleted_invites = delete_invitations_created_more_than_two_days_ago()
|
||||
deleted_invites += delete_org_invitations_created_more_than_two_days_ago()
|
||||
current_app.logger.info(
|
||||
"Delete job started {} finished {} deleted {} invitations".format(start, datetime.utcnow(), deleted)
|
||||
"Delete job started {} finished {} deleted {} invitations".format(start, datetime.utcnow(), deleted_invites)
|
||||
)
|
||||
except SQLAlchemyError:
|
||||
current_app.logger.exception("Failed to delete invitations")
|
||||
|
||||
@@ -149,6 +149,7 @@ class Config(object):
|
||||
ALREADY_REGISTERED_EMAIL_TEMPLATE_ID = '0880fbb1-a0c6-46f0-9a8e-36c986381ceb'
|
||||
CHANGE_EMAIL_CONFIRMATION_TEMPLATE_ID = 'eb4d9930-87ab-4aef-9bce-786762687884'
|
||||
SERVICE_NOW_LIVE_TEMPLATE_ID = '618185c6-3636-49cd-b7d2-6f6f5eb3bdde'
|
||||
ORGANISATION_INVITATION_EMAIL_TEMPLATE_ID = '203566f0-d835-47c5-aa06-932439c86573'
|
||||
|
||||
BROKER_URL = 'sqs://'
|
||||
BROKER_TRANSPORT_OPTIONS = {
|
||||
|
||||
@@ -225,13 +225,7 @@ organisation_to_service = db.Table(
|
||||
'organisation_to_service',
|
||||
db.Model.metadata,
|
||||
# service_id is a primary key as you can only have one organisation per service
|
||||
db.Column(
|
||||
'service_id',
|
||||
UUID(as_uuid=True),
|
||||
db.ForeignKey('services.id'),
|
||||
primary_key=True,
|
||||
unique=True,
|
||||
nullable=False),
|
||||
db.Column('service_id', UUID(as_uuid=True), db.ForeignKey('services.id'), primary_key=True, nullable=False),
|
||||
db.Column('organisation_id', UUID(as_uuid=True), db.ForeignKey('organisation.id'), nullable=False),
|
||||
)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from app.dao.invited_org_user_dao import (
|
||||
get_invited_org_users_for_organisation
|
||||
)
|
||||
from app.dao.templates_dao import dao_get_template_by_id
|
||||
from app.models import EMAIL_TYPE, KEY_TYPE_NORMAL, Service, InvitedOrganisationUser
|
||||
from app.models import EMAIL_TYPE, KEY_TYPE_NORMAL, InvitedOrganisationUser
|
||||
from app.notifications.process_notifications import persist_notification, send_notification_to_queue
|
||||
from app.schemas import invited_org_user_schema
|
||||
from app.errors import register_errors
|
||||
|
||||
Reference in New Issue
Block a user