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

Error in retrieving one result in retrieve_one #171

Closed
khoroshevskyi opened this issue Mar 6, 2024 · 2 comments
Closed

Error in retrieving one result in retrieve_one #171

khoroshevskyi opened this issue Mar 6, 2024 · 2 comments
Labels
bug Something isn't working likely-solved
Milestone

Comments

@khoroshevskyi
Copy link
Member

While I try to retrieve one result from one record, I got an error:

Input:

retrieve_one(record_identifier="id1", result_identifier=["description"])

Error:

TypeError: unhashable type: 'list'

We can clean this code by returning this value:

return_result = {key: value for key, value in result[0].items() if key in list(result_identifier)}
@khoroshevskyi khoroshevskyi added the bug Something isn't working label Mar 6, 2024
@nsheff nsheff added this to the v0.9.0 milestone Mar 12, 2024
@khoroshevskyi
Copy link
Member Author

It can't take a list with a single entity

@donaldcampbelljr donaldcampbelljr changed the title Error in retrieving one result in retireve_one Error in retrieving one result in retrieve_one Apr 3, 2024
@donaldcampbelljr
Copy link
Contributor

This is now fixed and I added a test to catch any future regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working likely-solved
Projects
None yet
Development

No branches or pull requests

3 participants