Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-pipeline
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-video-pipeline
Commits
cd3544c1
Commit
cd3544c1
authored
Aug 07, 2017
by
M. Rehan
Committed by
GitHub
Aug 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9 from edx/mrehan/auto-generated-images
Make course ids available to auto-generated images.
parents
e795d07f
73e0285f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
VEDA_OS01/serializers.py
+6
-0
No files found.
VEDA_OS01/serializers.py
View file @
cd3544c1
...
...
@@ -53,6 +53,8 @@ class CourseSerializer(serializers.ModelSerializer):
class
VideoSerializer
(
serializers
.
ModelSerializer
):
course_ids
=
serializers
.
SerializerMethodField
(
source
=
'get_course_ids'
,
read_only
=
True
)
class
Meta
:
model
=
Video
fields
=
(
...
...
@@ -71,8 +73,12 @@ class VideoSerializer(serializers.ModelSerializer):
'video_trans_end'
,
'video_trans_status'
,
'video_glacierid'
'course_ids'
)
def
get_course_ids
(
self
,
video
):
return
[
course_id
.
strip
()
for
course_id
in
video
.
inst_class
.
local_storedir
.
split
(
','
)
if
course_id
]
def
create
(
self
,
validated_data
):
return
Video
.
objects
.
create
(
**
validated_data
)
...
...
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