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
dbc465a5
Commit
dbc465a5
authored
Jan 28, 2015
by
jsa
Committed by
AlasdairSwan
Jan 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reuse instances of OSFS in old mongo
parent
4a76a629
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+4
-4
No files found.
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
dbc465a5
...
...
@@ -71,6 +71,9 @@ BLOCK_TYPES_WITH_CHILDREN = list(set(
# Allow us to call _from_deprecated_(son|string) throughout the file
# pylint: disable=protected-access
# at module level, cache one instance of OSFS per filesystem root.
_OSFS_INSTANCE
=
{}
class
MongoRevisionKey
(
object
):
"""
...
...
@@ -836,10 +839,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
location
=
Location
.
_from_deprecated_son
(
item
[
'location'
],
course_key
.
run
)
data_dir
=
getattr
(
item
,
'data_dir'
,
location
.
course
)
root
=
self
.
fs_root
/
data_dir
root
.
makedirs_p
()
# create directory if it doesn't exist
resource_fs
=
OSFS
(
root
)
resource_fs
=
_OSFS_INSTANCE
.
setdefault
(
root
,
OSFS
(
root
,
create
=
True
))
cached_metadata
=
{}
if
apply_cached_metadata
:
...
...
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