diff --git a/src/backend/pcn/section.py b/src/backend/pcn/section.py index 94374535..1ff8efb6 100644 --- a/src/backend/pcn/section.py +++ b/src/backend/pcn/section.py @@ -371,8 +371,13 @@ class Section(MutableMapping): )) elif isinstance(child, red.AssignmentNode): + if isinstance(child.target, red.NameNode): + name = child.target.value + else: + name = str(child.target.to_python()) + instance._set_property( - child.target.value, + name, child.annotation.dumps() if child.annotation else "", child.value.dumps(), )