Skip to content
Snippets Groups Projects
Unverified Commit 499abab7 authored by Waheed Ahmed's avatar Waheed Ahmed Committed by GitHub
Browse files

Merge pull request #19918 from edx/waheed/LEARNER-6643-return-credit-status-error

Return credit status error if no provider info found.
parents 4a9a5154 dbad7546
No related branches found
Tags release-2021-07-08-16.42
No related merge requests found
......@@ -510,6 +510,14 @@ def _credit_statuses(user, course_enrollments):
status["provider_status_url"] = provider_info.get("status_url")
status["provider_id"] = provider_id
if not status["provider_name"] and not status["provider_status_url"]:
status["error"] = True
log.error(
u"Could not find credit provider info for [%s] in [%s]. The user will not "
u"be able to see his or her credit request status on the student dashboard.",
provider_id, provider_info_by_id
)
statuses[course_key] = status
return statuses
......
......@@ -184,8 +184,6 @@ class CreditProvider(TimeStampedModel):
]
cache.set(cls.CREDIT_PROVIDERS_CACHE_KEY, credit_providers)
else:
log.info(u"Found %d credit providers from cache.", len(credit_providers))
if providers_list:
credit_providers = [provider for provider in credit_providers if provider['id'] in providers_list]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment