Commit e82053ee by Afzal Wali

Clearing the cache if the site's configuration was removed.

The site's configuration does not contain the API URL, it should not keep on displayed the old cached list of uuids.
LEARNER-1146
parent 447bee2e
...@@ -50,6 +50,7 @@ class Command(BaseCommand): ...@@ -50,6 +50,7 @@ class Command(BaseCommand):
site_config = getattr(site, 'configuration', None) site_config = getattr(site, 'configuration', None)
if site_config is None or not site_config.get_value('COURSE_CATALOG_API_URL'): 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)) 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 continue
client = create_catalog_api_client(user, site=site) 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