Răsfoiți Sursa

a bit simpler

Khaleel Al-Adhami 5 zile în urmă
părinte
comite
a610c271a3
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      reflex/vars/base.py

+ 3 - 3
reflex/vars/base.py

@@ -379,9 +379,9 @@ class MetaclassVar(type):
             name: The name of the attribute.
             name: The name of the attribute.
             value: The value of the attribute.
             value: The value of the attribute.
         """
         """
-        if name == _PYDANTIC_VALIDATE_VALUES:
-            value = _pydantic_validator
-        super().__setattr__(name, value)
+        super().__setattr__(
+            name, value if name != _PYDANTIC_VALIDATE_VALUES else _pydantic_validator
+        )
 
 
 
 
 @dataclasses.dataclass(
 @dataclasses.dataclass(