From 2567acbddff8f8d11a1f59f04fdd19b33d6c477e Mon Sep 17 00:00:00 2001 From: sks444 <krishnasingh.ss30@gmail.com> Date: Thu, 16 Dec 2021 17:45:41 +0530 Subject: [PATCH] Rename INITIALISE_INTACCT to INTACCT_ENABLED --- hypha/apply/projects/utils.py | 2 +- hypha/settings/base.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hypha/apply/projects/utils.py b/hypha/apply/projects/utils.py index 8a5d432ea..735b5e490 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 c57e91d00..bcb9b798f 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'] -- GitLab