mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
attempt to pull logos from the admin app's static images directory
(this is configured by a config value)
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
from datetime import datetime
|
||||
from monotonic import monotonic
|
||||
from urllib.parse import urljoin
|
||||
|
||||
from flask import current_app
|
||||
from notifications_utils.recipients import (
|
||||
validate_and_format_phone_number
|
||||
)
|
||||
from notifications_utils.template import Template, get_sms_fragment_count
|
||||
from notifications_utils.renderers import HTMLEmail, PlainTextEmail, SMSMessage
|
||||
|
||||
from app import notify_celery, statsd_client, clients, create_uuid
|
||||
from app.clients.email import EmailClientException
|
||||
from app.clients.sms import SmsClientException
|
||||
|
||||
from app.dao.notifications_dao import (
|
||||
update_provider_stats,
|
||||
get_notification_by_id,
|
||||
dao_update_notification,
|
||||
update_notification_status_by_id
|
||||
)
|
||||
|
||||
from app.dao.provider_details_dao import get_provider_details_by_notification_type
|
||||
from app.dao.services_dao import dao_fetch_service_by_id
|
||||
from app.celery.research_mode_tasks import send_sms_response, send_email_response
|
||||
from notifications_utils.recipients import (
|
||||
validate_and_format_phone_number
|
||||
)
|
||||
|
||||
from app.dao.templates_dao import dao_get_template_by_id
|
||||
from notifications_utils.template import Template, get_sms_fragment_count
|
||||
from notifications_utils.renderers import HTMLEmail, PlainTextEmail, SMSMessage
|
||||
|
||||
from app.models import SMS_TYPE, EMAIL_TYPE, KEY_TYPE_TEST, BRANDING_ORG
|
||||
from app.statsd_decorators import statsd
|
||||
@@ -190,9 +190,14 @@ def send_email_to_provider(self, service_id, notification_id):
|
||||
def get_html_email_renderer(service):
|
||||
govuk_banner = service.branding != BRANDING_ORG
|
||||
if service.organisation:
|
||||
logo = '{}{}{}'.format(
|
||||
current_app.config['ADMIN_BASE_URL'],
|
||||
current_app.config['BRANDING_PATH'],
|
||||
service.organisation.logo
|
||||
)
|
||||
branding = {
|
||||
'brand_colour': service.organisation.colour,
|
||||
'brand_logo': service.organisation.logo,
|
||||
'brand_logo': logo,
|
||||
'brand_name': service.organisation.name,
|
||||
}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user