Commit 445a923a by chrisndodge

Merge pull request #1266 from MITx/fix/cdodge/preview-failing

need to add the depth parameter to the DraftMongoStore   implementation ...
parents 0919c185 476e6c7b
...@@ -59,15 +59,15 @@ class DraftModuleStore(ModuleStoreBase): ...@@ -59,15 +59,15 @@ class DraftModuleStore(ModuleStoreBase):
except ItemNotFoundError: except ItemNotFoundError:
return wrap_draft(super(DraftModuleStore, self).get_item(location, depth)) return wrap_draft(super(DraftModuleStore, self).get_item(location, depth))
def get_instance(self, course_id, location): def get_instance(self, course_id, location, depth=0):
""" """
Get an instance of this location, with policy for course_id applied. Get an instance of this location, with policy for course_id applied.
TODO (vshnayder): this may want to live outside the modulestore eventually TODO (vshnayder): this may want to live outside the modulestore eventually
""" """
try: try:
return wrap_draft(super(DraftModuleStore, self).get_instance(course_id, as_draft(location))) return wrap_draft(super(DraftModuleStore, self).get_instance(course_id, as_draft(location), depth=depth))
except ItemNotFoundError: except ItemNotFoundError:
return wrap_draft(super(DraftModuleStore, self).get_instance(course_id, location)) return wrap_draft(super(DraftModuleStore, self).get_instance(course_id, location, depth=depth))
def get_items(self, location, depth=0): def get_items(self, location, depth=0):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment