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
432a40f0
Commit
432a40f0
authored
Feb 08, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update post_cohort_management_fix to Django 1.8
parent
9b5b7837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py
+15
-2
No files found.
openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py
View file @
432a40f0
...
@@ -15,16 +15,29 @@ class Command(BaseCommand):
...
@@ -15,16 +15,29 @@ class Command(BaseCommand):
help
=
'''
help
=
'''
Repairs any potential inconsistencies made in the window between running migrations 0005 and 0006, and deploying
Repairs any potential inconsistencies made in the window between running migrations 0005 and 0006, and deploying
the code changes to enforce use of CohortMembership that go with said migrations.
the code changes to enforce use of CohortMembership that go with said migrations.
|commit|: optional argument. If not provided, will dry-run and list number of operations that would be made.
commit: optional argument. If not provided, will dry-run and list number of operations that would be made.
'''
'''
def
add_arguments
(
self
,
parser
):
"""
Add arguments to the command parser.
"""
parser
.
add_argument
(
'--commit'
,
action
=
'store_true'
,
dest
=
'commit'
,
default
=
False
,
help
=
'Really commit the changes, otherwise, just dry run'
,
)
def
handle
(
self
,
*
args
,
**
options
):
def
handle
(
self
,
*
args
,
**
options
):
"""
"""
Execute the command. Since this is designed to fix any issues cause by running pre-CohortMembership code
Execute the command. Since this is designed to fix any issues cause by running pre-CohortMembership code
with the database already migrated to post-CohortMembership state, we will use the pre-CohortMembership
with the database already migrated to post-CohortMembership state, we will use the pre-CohortMembership
table CourseUserGroup as the canonical source of truth. This way, changes made in the window are persisted.
table CourseUserGroup as the canonical source of truth. This way, changes made in the window are persisted.
"""
"""
commit
=
'commit'
in
options
commit
=
options
[
'commit'
]
memberships_to_delete
=
0
memberships_to_delete
=
0
memberships_to_add
=
0
memberships_to_add
=
0
...
...
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