refs #0 The root commit.
This commit is contained in:
10
back/core/pydantic_field.py
Normal file
10
back/core/pydantic_field.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def get_pydantic_field(field_attrs: dict) -> tuple:
|
||||
match field_attrs["type"]:
|
||||
case "int" | "str":
|
||||
field = (field_attrs["type"], ...)
|
||||
case "file":
|
||||
field = (str, None)
|
||||
case _:
|
||||
return ()
|
||||
|
||||
return field
|
||||
Reference in New Issue
Block a user