Closed guacs closed 8 months ago
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code
Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/479
Description
When
__set_as_default_factory_for_type__
is set totTrue
, we try to access the__model__
in order to map the type to the factory. However, in base factories, the 'model' will not be defined and so it an 'AttributeError' will be raised when trying to access 'cls.model'. So, we simply ensure that 'model' defined before trying to access it.Close Issue(s)