I'm using fastapi + tortoise,
problem here is i was keep getting "NoValuesFetched" exception from tortoise
when a model has relation with other models.
so I jumped into TortoiseCRUDRouter class and had a look and added a line of code.
it should be because from_queryset() and from_tortoise_orm() has fetch_related().
it works fine if given schema is tortoise pydantic basemodel.
I'm using fastapi + tortoise, problem here is i was keep getting "NoValuesFetched" exception from tortoise when a model has relation with other models.
so I jumped into TortoiseCRUDRouter class and had a look and added a line of code. it should be because from_queryset() and from_tortoise_orm() has fetch_related().
it works fine if given schema is tortoise pydantic basemodel.
and