Closed PARKER-X closed 9 months ago
Can anyone help me
Product.save() returns either none, boolean or some integer value, to indicate it saved correctly on redis.
You probably want to return something after Product.get()
As far as I can tell, is not a redis-om issue.
@XChikuX This is not irrelevant to redis-om
. It's the same issue as in #546 & #539.
Basically redis-om
is not compatible with Pydantic>2. Works fine with pydantic<2.
@XChikuX Yeah man it's work for pydantic <2 Thanks!
@app.post("/products") def create(product: Product):
fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'inventory.schema.Product'> is a valid Pydantic field type. If you are using a return type annotation that is not a valid Pydantic field (e.g. Union[Response, dict, None]) you can disable generating the response model from the type annotation with the path operation decorator parameter response_model=None. Read more: https://fastapi.tiangolo.com/tutorial/response-model/