diff --git a/hypha/apply/projects/utils.py b/hypha/apply/projects/utils.py index 8a5d432ea58316fdadb5ba15a5dbf2aa1448b51f..735b5e490fb693785da74f1ce5ef336645fb2c33 100644 --- a/hypha/apply/projects/utils.py +++ b/hypha/apply/projects/utils.py @@ -7,7 +7,7 @@ def fetch_and_save_deliverables(project_id, program_project_id=''): """ Get deliverables from various third party integrations. """ - if settings.INITIALISE_INTACCT: + if settings.INTACCT_ENABLED: from hypha.apply.projects.services.sageintacct.utils import fetch_deliverables deliverables = fetch_deliverables(program_project_id) save_deliverables(project_id, deliverables) diff --git a/hypha/settings/base.py b/hypha/settings/base.py index c57e91d00fcc742b535961ce9b55b7d4f0098b54..bcb9b798f8c5d534ae9f18828bf84115e8b3f37b 100644 --- a/hypha/settings/base.py +++ b/hypha/settings/base.py @@ -655,9 +655,10 @@ if env.str('AWS_STORAGE_BUCKET_NAME', None): MATOMO_URL = env.get('MATOMO_URL', False) MATOMO_SITEID = env.get('MATOMO_SITEID', False) -# SAGE INTACCT Configuration -if 'INITIALISE_INTACCT' in env: - INITIALISE_INTACCT = env['INITIALISE_INTACCT'] + +INTACCT_ENABLED = False +if env.get('INTACCT_ENABLED', 'false').lower().strip() == 'true': + INTACCT_ENABLED = True INTACCT_SENDER_ID = env['INTACCT_SENDER_ID'] INTACCT_SENDER_PASSWORD = env['INTACCT_SENDER_PASSWORD'] INTACCT_USER_ID = env['INTACCT_USER_ID']