Skip to content
Advertisement

How to use values from list to validate some calculations in pydantic BaseModel?

I’m using Pydantic root_validator to perform some calculations in my model:

JavaScript

some data

JavaScript

when run

JavaScript

i get : 0.0, O.OO Iwant 220

How to make this function return the correct values?

Advertisement

Answer

I do not know if this is good why , but i get what i want

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement