moved SOCIAL_SHARING_SETTINGS out of FEATURES

fixed object has no attribute 'get'

fixed 'LazySettings' object has no attribute

add social settings to cms/env/aws
This commit is contained in:
Zia Fazal
2015-09-16 16:03:40 +05:00
parent 70866104bf
commit 14c14b07db
10 changed files with 40 additions and 34 deletions

View File

@@ -77,8 +77,8 @@ class CourseMetadata(object):
filtered_list.append('facebook_url')
# Do not show social sharing url field if the feature is disabled.
if (not settings.FEATURES.get('SOCIAL_SHARING_SETTINGS') or
not settings.FEATURES.get("SOCIAL_SHARING_SETTINGS").get("CUSTOM_COURSE_URLS")):
if (not hasattr(settings, 'SOCIAL_SHARING_SETTINGS') or
not getattr(settings, 'SOCIAL_SHARING_SETTINGS', {}).get("CUSTOM_COURSE_URLS")):
filtered_list.append('social_sharing_url')
# Do not show teams configuration if feature is disabled.