Commit a937e046 by Matt Drayer Committed by GitHub

Merge pull request #18 from edx/mattdrayer/add-sitecode-check

mattdrayer/add-sitecode-check: Include site_code check when considering site overrides
parents 37a434ee eefaa722
...@@ -32,7 +32,7 @@ def get_configuration(variable, site_code=None): ...@@ -32,7 +32,7 @@ def get_configuration(variable, site_code=None):
# Locate the setting in the specified module, then attempt to apply a site-specific override # Locate the setting in the specified module, then attempt to apply a site-specific override
setting_value = getattr(module, variable, None) setting_value = getattr(module, variable, None)
site_overrides = getattr(module, 'SITE_OVERRIDES', None) site_overrides = getattr(module, 'SITE_OVERRIDES', None)
if site_overrides: if site_overrides and site_code is not None:
site_specific_overrides = site_overrides.get(site_code) site_specific_overrides = site_overrides.get(site_code)
if site_specific_overrides: if site_specific_overrides:
override_value = site_specific_overrides.get(variable) override_value = site_specific_overrides.get(variable)
......
...@@ -6,7 +6,7 @@ with open('README.rst') as readme: ...@@ -6,7 +6,7 @@ with open('README.rst') as readme:
setup( setup(
name='edx-ecommerce-worker', name='edx-ecommerce-worker',
version='0.4.0', version='0.4.1',
description='Celery tasks supporting the operations of edX\'s ecommerce service', description='Celery tasks supporting the operations of edX\'s ecommerce service',
long_description=long_description, long_description=long_description,
classifiers=[ classifiers=[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment