Hi everyone ! I’m using nested pydantic models as...
# ask-community
c
Hi everyone ! I’m using nested pydantic models as input parameters for my flows. My issue here is that I’m blocked by mandatory field in optional nested model: My input looks like :
Copy code
class ModelB(pydantic.BaseModel):
    mandatory: string

class ModelA(pydantic.BaseModel):
    some_values: typing.Any
    b: ModelB | None = None
In some case, I don’t need to instantiate
ModelB
and to do so, I just don’t add it to the deployment’s yaml. This was working fine all along, but this morning the UI prevents me to run a deployment
Quick Run
as my field
ModelB.mandatory
is missing (even if I did not specify
ModelB
in
ModelA
in the yaml). Did something change and I have now to change my model parameters ?