Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add only available themes to site config #20

Open
wants to merge 1 commit into
base: develop-koa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@
]

EDLY_PANEL_WORKER_USER = 'edly_panel_worker'

AVAILABLE_THEMES = [
'openedx'
]

DEFAULT_THEME = 'openedx'
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from credentials.apps.core.models import SiteConfiguration
from credentials.apps.edx_credentials_extensions.edly_credentials_app.api.permissions import CanAccessSiteCreation
from credentials.apps.edx_credentials_extensions.edly_credentials_app.api.v1.constants import ERROR_MESSAGES
from credentials.apps.edx_credentials_extensions.edly_credentials_app.api.v1.constants import ERROR_MESSAGES, AVAILABLE_THEMES, DEFAULT_THEME
from credentials.apps.edx_credentials_extensions.edly_credentials_app.helpers import (
get_credentials_site_configuration,
validate_site_configurations,
Expand Down Expand Up @@ -72,7 +72,7 @@ def process_client_sites_setup(self):
edx_org_short_name=edly_slug,
platform_name=self.request.data.get('platform_name', ''),
company_name=self.request.data.get('platform_name', ''),
theme_name=theme_dir_name,
theme_name=theme_dir_name if theme_dir_name in AVAILABLE_THEMES else DEFAULT_THEME,
manan-memon marked this conversation as resolved.
Show resolved Hide resolved
lms_url_root=lms_url_root,
catalog_api_url=catalog_api_url,
tos_url='{lms_url_root}/tos'.format(lms_url_root=lms_url_root),
Expand Down