From 9874437fb46b8038e5c41cd67bd5cdad0c42acac Mon Sep 17 00:00:00 2001 From: root Date: Fri, 14 Jun 2024 14:54:40 +1000 Subject: [PATCH] Use enironment variable instead of CKAN setting to get admin email for submission email receipt --- .../ckanext/auscope_theme/logic/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckan/src/ckanext-auscope-theme/ckanext/auscope_theme/logic/schema.py b/ckan/src/ckanext-auscope-theme/ckanext/auscope_theme/logic/schema.py index 11f0246a..8db25588 100644 --- a/ckan/src/ckanext-auscope-theme/ckanext/auscope_theme/logic/schema.py +++ b/ckan/src/ckanext-auscope-theme/ckanext/auscope_theme/logic/schema.py @@ -5,6 +5,7 @@ from ckan.lib.base import render import ckan.lib.mailer as mailer from datetime import datetime +import os @@ -162,7 +163,7 @@ def send_admin_dataset_notification(context, pkg_dict): dataset_title = pkg_dict['title'] subject = 'AuScope Data Repository - Dataset Submitted "{dataset_title}"'.format(dataset_title=dataset_title) recipient_name = 'AuScope Data Repository admin' - recipient_email = config.get('ckan_sysadmin_email') + recipient_email = os.environ.get('CKAN_SYSADMIN_EMAIL') mailer.mail_recipient(recipient_name, recipient_email, subject, body)