Skip to content

Commit 69d57af

Browse files
Update reflex/experimental/hybrid_property.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 5fc942e commit 69d57af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reflex/experimental/hybrid_property.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def __get__(self, instance: Any, owner: type | None = None, /) -> Any:
3030
# Call custom var function if set
3131
return self._var(owner)
3232
# Call the property getter function if no custom var function is set
33-
assert self.fget is not None
33+
if self.fget is None:
34+
raise AttributeError("HybridProperty has no getter function")
3435
return self.fget(owner)
3536

3637
def var(self, func: Callable[[Any], Var]) -> Self:

0 commit comments

Comments
 (0)