add log to get insights about why data sharing consent is not required

This commit is contained in:
muhammad-ammar
2020-10-27 22:59:03 +05:00
parent efc04e3399
commit b8a315933f

View File

@@ -105,6 +105,12 @@ class ConsentApiClient(object):
# No Enterprise record exists, but we're already enrolled in a course. So, go ahead and proceed.
if enrollment_exists and not response.get('exists', False):
LOGGER.info(
'[ENTERPRISE DSC] No Consent Required. APIParams: [%s], APIResponse: [%s], EnrollmentExists: [%s]',
kwargs,
response,
enrollment_exists,
)
return False
# In all other cases, just trust the Consent API.