flask-peewee
flask-peewee copied to clipboard
get_model_from_dictionary and JSONField
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):
...