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
3282c37d
Commit
3282c37d
authored
Aug 13, 2016
by
Clinton Blackburn
Committed by
GitHub
Aug 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set Program.excluded_course_runs to be an optional field (#241)
ECOM-5097
parent
8eff1815
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletions
+20
-1
course_discovery/apps/course_metadata/migrations/0015_auto_20160813_2142.py
+19
-0
course_discovery/apps/course_metadata/models.py
+1
-1
No files found.
course_discovery/apps/course_metadata/migrations/0015_auto_20160813_2142.py
0 → 100644
View file @
3282c37d
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'course_metadata'
,
'0014_auto_20160811_0436'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'program'
,
name
=
'excluded_course_runs'
,
field
=
models
.
ManyToManyField
(
blank
=
True
,
null
=
True
,
to
=
'course_metadata.CourseRun'
),
),
]
course_discovery/apps/course_metadata/models.py
View file @
3282c37d
...
...
@@ -556,7 +556,7 @@ class Program(TimeStampedModel):
courses
=
models
.
ManyToManyField
(
Course
)
# NOTE (CCB): Editors of this field should validate the values to ensure only CourseRuns associated
# with related Courses are stored.
excluded_course_runs
=
models
.
ManyToManyField
(
CourseRun
)
excluded_course_runs
=
models
.
ManyToManyField
(
CourseRun
,
blank
=
True
,
null
=
True
)
partner
=
models
.
ForeignKey
(
Partner
,
null
=
True
,
blank
=
False
)
overview
=
models
.
TextField
(
null
=
True
,
blank
=
True
)
weeks_to_complete
=
models
.
PositiveSmallIntegerField
(
null
=
True
,
blank
=
True
)
...
...
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