mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-06 13:30:41 +02:00
updates has_load_state_decorator logic
This commit is contained in:
parent
eddf3dd2fc
commit
1af4f98a48
@ -50,11 +50,10 @@ def has_load_state_decorator(prop: property):
|
|||||||
decorator.
|
decorator.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if prop and isinstance(prop, property):
|
try:
|
||||||
# Check if the setter function has the attribute set by the @load_state
|
return getattr(prop.fset, "_load_state")
|
||||||
# decorator
|
except AttributeError:
|
||||||
return getattr(prop.fset, "_load_state", False)
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
class StateManager:
|
class StateManager:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user