Skip to content

Commit

Permalink
Dead import removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed May 29, 2017
1 parent c33bc34 commit c79cd23
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion marrow/mongo/core/field/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import unicode_literals

from ... import Document, Field
from ... import Field
from .base import _HasKind, _CastingKind


Expand All @@ -29,6 +29,9 @@ def to_native(self, obj, name, value):
if isinstance(value, self.List):
return value

if value is None:
return None

result = self.List(super(Array, self).to_native(obj, name, i) for i in value)
obj.__data__[self.__name__] = result

Expand All @@ -37,4 +40,7 @@ def to_native(self, obj, name, value):
def to_foreign(self, obj, name, value):
"""Transform to a MongoDB-safe value."""

if value is None:
return None

return self.List(super(Array, self).to_foreign(obj, name, i) for i in value)

0 comments on commit c79cd23

Please sign in to comment.