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
2f2cb5a5
Commit
2f2cb5a5
authored
Apr 22, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #78 from edx/clintonb/image-url-fix
Removed calls to lowercase media URLs
parents
ea93ef62
d3da2ef7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
course_discovery/apps/course_metadata/data_loaders.py
+3
-3
No files found.
course_discovery/apps/course_metadata/data_loaders.py
View file @
2f2cb5a5
...
...
@@ -120,7 +120,7 @@ class OrganizationsApiDataLoader(AbstractDataLoader):
image
=
None
image_url
=
body
[
'logo'
]
if
image_url
:
image_url
=
image_url
.
lower
()
image_url
=
image_url
image
,
__
=
Image
.
objects
.
get_or_create
(
src
=
image_url
)
defaults
=
{
'name'
:
body
[
'name'
],
...
...
@@ -209,7 +209,7 @@ class CoursesApiDataLoader(AbstractDataLoader):
image_url
=
body
[
'media'
]
.
get
(
'image'
,
{})
.
get
(
'raw'
)
if
image_url
:
image_url
=
image_url
.
lower
()
image_url
=
image_url
image
,
__
=
Image
.
objects
.
get_or_create
(
src
=
image_url
)
return
image
...
...
@@ -219,7 +219,7 @@ class CoursesApiDataLoader(AbstractDataLoader):
video_url
=
body
[
'media'
]
.
get
(
'course_video'
,
{})
.
get
(
'uri'
)
if
video_url
:
video_url
=
video_url
.
lower
()
video_url
=
video_url
video
,
__
=
Video
.
objects
.
get_or_create
(
src
=
video_url
)
return
video
...
...
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