Skip to content

Commit

Permalink
Frameworks: use proxy.get rather than access _data
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed May 2, 2020
1 parent f47bff3 commit f845fab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions umongo/frameworks/motor_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ async def _io_validate_data_proxy(schema, data_proxy, partial=None):
for name, field in schema.fields.items():
if partial and name not in partial:
continue
data_name = field.attribute or name
value = data_proxy._data[data_name]
value = data_proxy.get(name)
if value is ma.missing:
continue
try:
Expand Down
3 changes: 1 addition & 2 deletions umongo/frameworks/pymongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ def _io_validate_data_proxy(schema, data_proxy, partial=None):
for name, field in schema.fields.items():
if partial and name not in partial:
continue
data_name = field.attribute or name
value = data_proxy._data[data_name]
value = data_proxy.get(name)
if value is ma.missing:
continue
try:
Expand Down
3 changes: 1 addition & 2 deletions umongo/frameworks/txmongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ def _io_validate_data_proxy(schema, data_proxy, partial=None):
for name, field in schema.fields.items():
if partial and name not in partial:
continue
data_name = field.attribute or name
value = data_proxy._data[data_name]
value = data_proxy.get(name)
if value is ma.missing:
continue
try:
Expand Down

0 comments on commit f845fab

Please sign in to comment.