Skip to content
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

Fixed Bug in Which Mapper Can't Map to ListConfig if Input is None #13

Merged
merged 4 commits into from Jun 15, 2018

Conversation

NdubisiOnuora
Copy link

@NdubisiOnuora NdubisiOnuora commented Jun 14, 2018

Example:
if value of config is the following

ListConfig('example.food', {'item': 'name'})

And input is

{'example': {'food': None}}

The following error is shown
TypeError: 'NoneType' object is not iterable

This fix just returns an empty list if the input is None.

@coveralls
Copy link

coveralls commented Jun 14, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 8a8ed0a on NdubisiOnuora:fix_list_config_null into 348b6cb on dealertrack:master.

@NdubisiOnuora
Copy link
Author

@miki725, please review and merge.

@@ -3,4 +3,4 @@


__author__ = 'Miroslav Shubernetskiy'
__version__ = '0.3.4'
__version__ = '0.3.5'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update HISTORY.rst as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@NdubisiOnuora
Copy link
Author

@miki725: whenever you're ready to re-review and merge.

HISTORY.rst Outdated
0.3.5 (2018-06-14)
~~~~~~~~~~~~~~~~~~~~~

* Fixed bug in which TypeError would result if a None value were mapped to a ``ListConfig``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap TyperError around double backticks to render as code. same for None

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@NdubisiOnuora
Copy link
Author

@miki725, all changes have been made.

@NdubisiOnuora
Copy link
Author

@miki725: ping.

@miki725 miki725 merged commit 653000e into dealertrack:master Jun 15, 2018
@NdubisiOnuora
Copy link
Author

Yaissssssssssss!

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.

None yet

3 participants