I am learning pydantic-redis,and I tried to modify the example at https://github.com/sopherapps/pydantic-redis
by adding a new field new_field: dict = {} as follows
class Book(Model):
_primary_key_field: str = 'title'
title: str
author: str
published_on: date
in_stock: bool = True
new_field: dict = {}
when I run the example it says (in the end):
value is not a valid dict (type=type_error.dict)
I have also tried other types, like new_field: List[int] = [8] (and then importing typing.List)
On the other hand, when I add a new field with a primitive type like int, everything works fine.
What have I missed?
Best regards