Skip to content

Commit

Permalink
Updated site creation to only use supported themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmanann committed Oct 29, 2024
1 parent 810eb07 commit 4fc38b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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,
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

0 comments on commit 4fc38b9

Please sign in to comment.