Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
16e6f8c7
Commit
16e6f8c7
authored
Aug 18, 2016
by
Bill DeRusha
Committed by
GitHub
Aug 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #257 from edx/bderusha/program-dupes-ECOM-5209
Update program data loader to match drupal loader
parents
64e29046
c3bf5f97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
course_discovery/apps/course_metadata/data_loaders/api.py
+6
-3
No files found.
course_discovery/apps/course_metadata/data_loaders/api.py
View file @
16e6f8c7
...
...
@@ -290,16 +290,19 @@ class ProgramsApiDataLoader(AbstractDataLoader):
try
:
defaults
=
{
'uuid'
:
uuid
,
'title'
:
body
[
'name'
],
'subtitle'
:
body
[
'subtitle'
],
'type'
:
self
.
XSERIES
,
'status'
:
body
[
'status'
],
'marketing_slug'
:
body
[
'marketing_slug'
],
'banner_image_url'
:
self
.
_get_banner_image_url
(
body
),
'partner'
:
self
.
partner
,
}
program
,
__
=
Program
.
objects
.
update_or_create
(
uuid
=
uuid
,
defaults
=
defaults
)
program
,
__
=
Program
.
objects
.
update_or_create
(
marketing_slug
=
body
[
'marketing_slug'
],
partner
=
self
.
partner
,
defaults
=
defaults
)
self
.
_update_program_organizations
(
body
,
program
)
self
.
_update_program_courses_and_runs
(
body
,
program
)
self
.
_update_program_banner_image
(
body
,
program
)
...
...
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