You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to work as expected, with a list of UUID strings returned for user. However when trying to load the OpenAPI docs I get an error in the brower and log output:
...
File "/opt/venv/lib/python3.11/site-packages/ninja/orm/fields.py", line 88, in __get_pydantic_json_schema__
json_type = {
^
KeyError: <class 'uuid.UUID'>
If I exclude the user field, then OpenAPI is fine, and I can return the list of UUIDs by using resolve:
Describe the bug
I have a
Project
model with a many_to_many relationship toUser
calleduser
. Both models use UUID as pk.Created a schema like this:
and an endpoint like this:
This seems to work as expected, with a list of UUID strings returned for
user
. However when trying to load the OpenAPI docs I get an error in the brower and log output:If I exclude the
user
field, then OpenAPI is fine, and I can return the list of UUIDs by using resolve:Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: