Open
Description
Functions like this one are causing us an issue. We are constructing Line
from an already-constructed Line_Common
instance. The code fails because it expects a dict instead.
I think that the best solution is to make them mode="after"
validators instead. I have found it to always be better to use after validators unless I really need to perform some manipulation before Pydantic has run its type conversions. If this function were an after validator then it self
would always be a constructed model.
Would you be OK with such a change? We could submit a PR.
Metadata
Metadata
Assignees
Labels
No labels