Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
f3a30e6f
Commit
f3a30e6f
authored
Nov 28, 2016
by
attiyaishaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TNL-6004 Fixing 500 in video transcripts.
parent
ab44b12a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
common/lib/xmodule/xmodule/tests/test_video.py
+10
-0
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
+1
-1
No files found.
common/lib/xmodule/xmodule/tests/test_video.py
View file @
f3a30e6f
...
...
@@ -1073,3 +1073,13 @@ class VideoDescriptorIndexingTestCase(unittest.TestCase):
descriptor
=
instantiate_descriptor
(
data
=
xml_data_transcripts
)
validation
=
descriptor
.
validate
()
self
.
assert_validation_message
(
validation
,
expected_validation_msg
)
def
test_video_transcript_none
(
self
):
"""
Test video when transcripts is None.
"""
descriptor
=
instantiate_descriptor
(
data
=
None
)
descriptor
.
transcripts
=
None
response
=
descriptor
.
get_transcripts_info
()
expected
=
{
'transcripts'
:
{},
'sub'
:
''
}
self
.
assertEquals
(
expected
,
response
)
common/lib/xmodule/xmodule/video_module/transcripts_utils.py
View file @
f3a30e6f
...
...
@@ -673,7 +673,7 @@ class VideoTranscriptsMixin(object):
transcripts
=
copy
.
deepcopy
(
get_bumper_settings
(
self
)
.
get
(
'transcripts'
,
{}))
sub
=
transcripts
.
pop
(
"en"
,
""
)
else
:
transcripts
=
self
.
transcripts
transcripts
=
self
.
transcripts
if
self
.
transcripts
else
{}
sub
=
self
.
sub
# Only attach transcripts that are not empty.
...
...
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