Skip to content

Commit 9365757

Browse files
committed
we still console erroring
1 parent 653033d commit 9365757

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

reflex/state.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1356,12 +1356,9 @@ def __setattr__(self, name: str, value: Any):
13561356
field = fields[name]
13571357
field_type = _unwrap_field_type(true_type_for_pydantic_field(field))
13581358
if not _isinstance(value, field_type):
1359-
console.deprecate(
1360-
"mismatched-type-assignment",
1361-
f"Tried to assign value {value} of type {type(value)} to field {type(self).__name__}.{name} of type {field_type}."
1362-
" This might lead to unexpected behavior.",
1363-
"0.6.5",
1364-
"0.7.0",
1359+
console.error(
1360+
f"Expected field '{type(self).__name__}.{name}' to receive type '{field_type}',"
1361+
f" but got '{value}' of type '{type(value)}'."
13651362
)
13661363

13671364
# Set the attribute.

0 commit comments

Comments
 (0)