Skip to content

ArrayUnmarshaller: return None on nullable type instead of "NoneType object is not iterable" crash #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2021

Conversation

jgod
Copy link
Contributor

@jgod jgod commented Jan 13, 2021

See: #251

Addresses this point specifically:

When nullable is set for arrays (i.e. type: array & nullable: true), null value not being properly validated, instead, it raising error: 'NoneType' object is not iterable. So, the same issue that diogobaeder reported in the second post.

@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #276 (22a2771) into master (0aeb144) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #276   +/-   ##
=======================================
  Coverage   96.80%   96.80%           
=======================================
  Files         122      122           
  Lines        2407     2412    +5     
=======================================
+ Hits         2330     2335    +5     
  Misses         77       77           
Impacted Files Coverage Δ
...penapi_core/unmarshalling/schemas/unmarshallers.py 94.73% <100.00%> (+0.07%) ⬆️
openapi_core/templating/paths/finders.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aeb144...22a2771. Read the comment docs.

@p1c2u
Copy link
Collaborator

p1c2u commented Feb 1, 2021

@jgod thanks for the contribution. Looks good. We just need to add tests to cover use cases.

@p1c2u p1c2u merged commit c309089 into python-openapi:master Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants