Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ecommerce
Commits
118d73de
Commit
118d73de
authored
Aug 06, 2015
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Request that the Enrollment API include expired course modes in its responses
XCOM-537.
parent
3c304ccb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ecommerce/extensions/catalogue/management/commands/migrate_course.py
+2
-2
No files found.
ecommerce/extensions/catalogue/management/commands/migrate_course.py
View file @
118d73de
...
...
@@ -98,7 +98,7 @@ class MigratedCourse(object):
def
_query_enrollment_api
(
self
,
headers
):
"""Get modes and pricing from Enrollment API."""
url
=
self
.
_build_lms_url
(
'api/enrollment/v1/course/{}'
.
format
(
self
.
course
.
id
))
url
=
self
.
_build_lms_url
(
'api/enrollment/v1/course/{}
?include_expired=1
'
.
format
(
self
.
course
.
id
))
response
=
requests
.
get
(
url
,
headers
=
headers
)
if
response
.
status_code
!=
200
:
...
...
@@ -125,7 +125,7 @@ class MigratedCourse(object):
course_name
,
course_verification_deadline
=
self
.
_query_commerce_api
(
headers
)
except
Exception
as
e
:
# pylint: disable=broad-except
logger
.
warning
(
u"Calling
Enrollment
API failed with: [
%
s]. Falling back to Course Structure API."
,
u"Calling
Commerce
API failed with: [
%
s]. Falling back to Course Structure API."
,
e
.
message
)
course_name
,
course_verification_deadline
=
self
.
_query_course_structure_api
(
access_token
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment