mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 16:50:02 +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.
|
||||
"""
|
||||
|
||||
if prop and isinstance(prop, property):
|
||||
# Check if the setter function has the attribute set by the @load_state
|
||||
# decorator
|
||||
return getattr(prop.fset, "_load_state", False)
|
||||
return False
|
||||
try:
|
||||
return getattr(prop.fset, "_load_state")
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
||||
class StateManager:
|
||||
|
Loading…
x
Reference in New Issue
Block a user