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

Formatting of data from query responses may fail if data type doesn't have a formatter specified #21

Open
rhigman opened this issue Jan 12, 2023 · 0 comments

Comments

@rhigman
Copy link
Member

rhigman commented Jan 12, 2023

if self.structure in default_fields.keys():

There is no corresponding else to the above if statement, which sets the correct data formatter to use on the data structure found in a query response. This means that if a data type isn't included in the default_fields dict, the client will attempt to format the response using whatever data formatter had previously been set.

To reproduce: run the serieses query and then the books query. Serieses are included in default_fields and books are not. The books query will raise an error showing that the client had attempted to format the response as though it were a set of serieses (hitting an error when no seriesName was found).

The example is from v0.9.0, but the issue also occurs in earlier versions of structures.py.

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

No branches or pull requests

1 participant