diff --git a/openedx/core/djangoapps/ace_common/settings/common.py b/openedx/core/djangoapps/ace_common/settings/common.py index ab3c4f90c617..993412f392bb 100644 --- a/openedx/core/djangoapps/ace_common/settings/common.py +++ b/openedx/core/djangoapps/ace_common/settings/common.py @@ -31,17 +31,12 @@ def plugin_settings(settings): # lint-amnesty, pylint: disable=missing-function # Note: To local development with Firebase, you must set FIREBASE_CREDENTIALS_PATH # (path to json file with FIREBASE_CREDENTIALS) # or FIREBASE_CREDENTIALS dictionary. - # AND COMMENT or remove `settings.FIREBASE_APP = None` string below. settings.FIREBASE_CREDENTIALS_PATH = None settings.FIREBASE_CREDENTIALS = None - settings.FIREBASE_APP = None - used_firebase_credentials = getattr(settings, 'FIREBASE_CREDENTIALS_PATH', None) - if not used_firebase_credentials: - used_firebase_credentials = getattr(settings, 'FIREBASE_CREDENTIALS', None) - - settings.FIREBASE_APP = setup_firebase_app(settings.FIREBASE_CREDENTIALS_PATH or settings.FIREBASE_CREDENTIALS, settings.FCM_APP_NAME) - settings.FIREBASE_APP = setup_firebase_app(used_firebase_credentials, settings.FCM_APP_NAME) + settings.FIREBASE_APP = setup_firebase_app( + settings.FIREBASE_CREDENTIALS_PATH or settings.FIREBASE_CREDENTIALS, settings.FCM_APP_NAME + ) if getattr(settings, 'FIREBASE_APP', None): settings.ACE_ENABLED_CHANNELS.append(settings.ACE_CHANNEL_DEFAULT_PUSH) diff --git a/openedx/core/djangoapps/ace_common/settings/production.py b/openedx/core/djangoapps/ace_common/settings/production.py index fc1e129d4d7f..d0076eafc3bd 100644 --- a/openedx/core/djangoapps/ace_common/settings/production.py +++ b/openedx/core/djangoapps/ace_common/settings/production.py @@ -33,12 +33,9 @@ def plugin_settings(settings): ) settings.FIREBASE_CREDENTIALS = settings.ENV_TOKENS.get('FIREBASE_CREDENTIALS', settings.FIREBASE_CREDENTIALS) - used_firebase_credentials = settings.FIREBASE_CREDENTIALS_PATH - if not used_firebase_credentials: - used_firebase_credentials = settings.FIREBASE_CREDENTIALS - - if used_firebase_credentials: - settings.FIREBASE_APP = setup_firebase_app(used_firebase_credentials, settings.FCM_APP_NAME) + settings.FIREBASE_APP = setup_firebase_app( + settings.FIREBASE_CREDENTIALS_PATH or settings.FIREBASE_CREDENTIALS, settings.FCM_APP_NAME + ) if settings.FIREBASE_APP: settings.ACE_ENABLED_CHANNELS.append(settings.ACE_CHANNEL_DEFAULT_PUSH)