fixes Quantity changes through IonizerServer

This commit is contained in:
Mose Mueller 2024-02-01 10:34:04 +01:00
parent 8b663bc996
commit 6619895239

View File

@ -66,6 +66,8 @@ class RPCInterface:
# I need to use the name attribute as this is what # I need to use the name attribute as this is what
# DataService.__set_attribute_based_on_type expects # DataService.__set_attribute_based_on_type expects
value = list(current_value.__class__)[value].name value = list(current_value.__class__)[value].name
if isinstance(current_value, Quantity):
value = value * current_value.u
elif isinstance(current_value, NumberSlider): elif isinstance(current_value, NumberSlider):
parent_path_list.append(attr_name) parent_path_list.append(attr_name)
attr_name = "value" attr_name = "value"