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

get_model_from_dictionary and JSONField #128

Open
rammie opened this issue Mar 15, 2014 · 0 comments
Open

get_model_from_dictionary and JSONField #128

rammie opened this issue Mar 15, 2014 · 0 comments

Comments

@rammie
Copy link

rammie commented Mar 15, 2014

Fields that may be provided as dictionaries break this function. Specifically it breaks when using JSON or HStore fields from the peewee postgres_ext. The function assumes that if the value is a dictionary then the field must be a ForeignKeyField. One way to fix this would be to change the condition to:

if isinstance(value, dict) and isinstance(field, ForeignKeyField):
    ...
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