Commit bea31fb8 by Hasnain

...

parent 14fd1972
...@@ -430,6 +430,15 @@ class SiteConfiguration(models.Model): ...@@ -430,6 +430,15 @@ class SiteConfiguration(models.Model):
def commerce_api_client(self): def commerce_api_client(self):
log.info("--------------testing---------------------") log.info("--------------testing---------------------")
log.info(self.build_lms_url('/api/commerce/v1/')) log.info(self.build_lms_url('/api/commerce/v1/'))
try:
return EdxRestApiClient(self.build_lms_url('/api/commerce/v1/'), jwt=self.access_token)
except Exception as e:
log.exception(
'Failed to publish CreditCourse for to LMS. Status was [%d]. Body was [%s].',
e.response.status_code,
e.content
)
return EdxRestApiClient(self.build_lms_url('/api/commerce/v1/'), jwt=self.access_token) return EdxRestApiClient(self.build_lms_url('/api/commerce/v1/'), jwt=self.access_token)
@cached_property @cached_property
......
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