xsdata-pydantic
xsdata-pydantic copied to clipboard
Ensure model_fields is called on a BaseModel subclass
📒 Description
In some cases
get_fieldsreceives an instance of a pydantic model. Accessing themodel_fieldsattribute from the instance is deprecated and it should be accessed from the class.
🔗 What I've Done
I added an extra check to ensure the
objis always a class.
🛫 Checklist
- [ ] Updated docs
- [ ] Added unit-tests