Default None
for uuid property raises AttributeError
(name collision)
#6646
Labels
None
for uuid property raises AttributeError
(name collision)
#6646
Initial Checks
Description
Declaring a pydantic model with a property named
uuid
and typeuuid.UUID | None
and a default value ofNone
raisesAttributeError: 'NoneType' object has no attribute 'UUID'
.This is probably true for other import/property name collisions as well.
Work arounds:
from uuid import UUID
Example Code
Python, Pydantic & OS Version
Selected Assignee: @adriangb
The text was updated successfully, but these errors were encountered: