Commit 4c3b4a59 by Don Mitchell

Merge pull request #5208 from edx/split/misc_fixups

Split/misc fixups
parents a08ca415 ad57cbe9
...@@ -3,7 +3,6 @@ Segregation of pymongo functions from the data modeling mechanisms for split mod ...@@ -3,7 +3,6 @@ Segregation of pymongo functions from the data modeling mechanisms for split mod
""" """
import re import re
import pymongo import pymongo
from bson import son
from contracts import check from contracts import check
from xmodule.exceptions import HeartbeatFailure from xmodule.exceptions import HeartbeatFailure
from xmodule.modulestore.split_mongo import BlockKey from xmodule.modulestore.split_mongo import BlockKey
...@@ -60,13 +59,6 @@ def structure_to_mongo(structure): ...@@ -60,13 +59,6 @@ def structure_to_mongo(structure):
return new_structure return new_structure
def definition_from_mongo(definition):
"""
Converts 'fields.children' from a list [[block_type, block_id]] to [BlockKey]
"""
new_def = dict(definition)
class MongoConnection(object): class MongoConnection(object):
""" """
Segregation of pymongo functions from the data modeling mechanisms for split modulestore. Segregation of pymongo functions from the data modeling mechanisms for split modulestore.
......
...@@ -2135,14 +2135,6 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase): ...@@ -2135,14 +2135,6 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
# should this recurse down dicts and lists just in case they contain datetime? # should this recurse down dicts and lists just in case they contain datetime?
elif not isinstance(value, datetime.datetime): # don't convert datetimes! elif not isinstance(value, datetime.datetime): # don't convert datetimes!
fields[field_name] = xblock_class.fields[field_name].to_json(value) fields[field_name] = xblock_class.fields[field_name].to_json(value)
# I think these are obsolete conditions; so, I want to confirm that. Thus the warnings
if 'location' in fields:
log.warn('attempt to persist location')
del fields['location']
if 'block_type' in fields:
log.warn('attempt to persist category')
del fields['block_type']
return fields return fields
def _new_structure(self, user_id, root_block_key, block_fields=None, definition_id=None): def _new_structure(self, user_id, root_block_key, block_fields=None, definition_id=None):
......
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