Skip to content

FlatterDict conversion to dict results in AttributeError #41

Description

@sergray
>>> import flatdict
>>> flatdict.FlatterDict({'l': [{'b':'c'}, 'd']}).as_dict()
python3.7/site-packages/flatdict.py in _child_as_list(self, pk, ck): 474
AttributeError: 'str' object has no attribute 'original_type'
>>> flatdict.__version__                                                                           
'4.0.1'

The error is caused by 'd' item in the list. It happens also if the item in the original list is an int or float

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions