minor compat tweak
This commit is contained in:
parent
fdc1d94f47
commit
953123b3dc
@ -675,10 +675,12 @@ class BaseDocument(object):
|
|||||||
if not only_fields:
|
if not only_fields:
|
||||||
only_fields = []
|
only_fields = []
|
||||||
|
|
||||||
# get the class name from the document, falling back to the given
|
# Get the class name from the document, falling back to the given
|
||||||
# class if unavailable
|
# class if unavailable
|
||||||
class_name = son.get('_cls', cls._class_name)
|
class_name = son.get('_cls', cls._class_name)
|
||||||
data = {key: value for key, value in son.iteritems()}
|
|
||||||
|
# Convert SON to a dict, making sure each key is a string
|
||||||
|
data = {str(key): value for key, value in son.iteritems()}
|
||||||
|
|
||||||
# Return correct subclass for document type
|
# Return correct subclass for document type
|
||||||
if class_name != cls._class_name:
|
if class_name != cls._class_name:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user