Skip to content

Commit 02f0422

Browse files
committed
rollback changes
1 parent a4ee8c7 commit 02f0422

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

mapper/object_mapper.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,9 @@ def not_excluded(s):
167167

168168
else:
169169
# try find property with the same name in the source
170-
if prop not in from_props:
171-
continue
172-
173-
# prop_to_type = type(from_props[prop])
174-
175-
# if isclass(prop_to_type) and \
176-
# not issubclass(prop_to_type, Enum) and \
177-
# prop_to_type is not type(None) and \
178-
# not __builtins__.get(type(from_props[prop]).__name__):
179-
# self.map(from_props[prop], key_to, allow_none=allow_none)
180-
# else:
181-
setattr(inst, prop, from_props[prop])
182-
# case when target attribute is not mapped (can be extended)
170+
if prop in from_props:
171+
setattr(inst, prop, from_props[prop])
172+
# case when target attribute is not mapped (can be extended)
183173
else:
184174
raise ObjectMapperException("No mapping defined for {0} -> {1}".format(key_from, key_to))
185175

0 commit comments

Comments
 (0)