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
d8103d43
Commit
d8103d43
authored
Dec 05, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
course.save() is no longer necessary
parent
c9319823
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
cms/djangoapps/contentstore/views/course.py
+0
-10
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
d8103d43
...
...
@@ -698,9 +698,6 @@ def textbooks_list_handler(request, tag=None, course_id=None, branch=None, versi
if
not
any
(
tab
[
'type'
]
==
'pdf_textbooks'
for
tab
in
course
.
tabs
):
course
.
tabs
.
append
({
"type"
:
"pdf_textbooks"
})
course
.
pdf_textbooks
=
textbooks
# Save the data that we've just changed to the underlying
# MongoKeyValueStore before we update the mongo datastore.
course
.
save
()
store
.
update_metadata
(
course
.
location
,
own_metadata
(
course
)
...
...
@@ -722,9 +719,6 @@ def textbooks_list_handler(request, tag=None, course_id=None, branch=None, versi
tabs
=
course
.
tabs
tabs
.
append
({
"type"
:
"pdf_textbooks"
})
course
.
tabs
=
tabs
# Save the data that we've just changed to the underlying
# MongoKeyValueStore before we update the mongo datastore.
course
.
save
()
store
.
update_metadata
(
course
.
location
,
own_metadata
(
course
))
resp
=
JsonResponse
(
textbook
,
status
=
201
)
resp
[
"Location"
]
=
locator
.
url_reverse
(
'textbooks'
,
textbook
[
"id"
])
...
...
@@ -776,9 +770,6 @@ def textbooks_detail_handler(request, tid, tag=None, course_id=None, branch=None
course
.
pdf_textbooks
=
new_textbooks
else
:
course
.
pdf_textbooks
.
append
(
new_textbook
)
# Save the data that we've just changed to the underlying
# MongoKeyValueStore before we update the mongo datastore.
course
.
save
()
store
.
update_metadata
(
course
.
location
,
own_metadata
(
course
)
...
...
@@ -791,7 +782,6 @@ def textbooks_detail_handler(request, tid, tag=None, course_id=None, branch=None
new_textbooks
=
course
.
pdf_textbooks
[
0
:
i
]
new_textbooks
.
extend
(
course
.
pdf_textbooks
[
i
+
1
:])
course
.
pdf_textbooks
=
new_textbooks
course
.
save
()
store
.
update_metadata
(
course
.
location
,
own_metadata
(
course
)
...
...
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