Commit 17d53860 by Afzal Wali Naushahi Committed by GitHub

Merge pull request #15632 from edx/afzaledx/clear_cached_programs

Clearing the cache if the site's configuration was removed.
parents b524f0e1 e82053ee
......@@ -50,6 +50,7 @@ class Command(BaseCommand):
site_config = getattr(site, 'configuration', None)
if site_config is None or not site_config.get_value('COURSE_CATALOG_API_URL'):
logger.info('Skipping site {domain}. No configuration.'.format(domain=site.domain))
cache.set(SITE_PROGRAM_UUIDS_CACHE_KEY_TPL.format(domain=site.domain), [], None)
continue
client = create_catalog_api_client(user, site=site)
......
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