Browse Source

Fix property key when creating RecursiveProperty from dict

master
Burathar 3 years ago
parent
commit
92daa0c51c
  1. 4
      biscd/biscd/models/recursive_property.py
  2. 2
      biscd/biscd/models/yaml_serializable.py

4
biscd/biscd/models/recursive_property.py

@ -34,4 +34,8 @@ class RecursiveProperty:
# Fill instance with dict # Fill instance with dict
recursive_property.__dict__ = property_dict recursive_property.__dict__ = property_dict
# Add property_key as property, because previous line removed it.
recursive_property.property_key = property_key
return recursive_property return recursive_property

2
biscd/biscd/models/yaml_serializable.py

@ -21,7 +21,7 @@ class YamlSerializable(RecursiveProperty):
required_attributes = ['name'] required_attributes = ['name']
def __init__(self): def __init__(self):
self.property_key='name' super().__init__('name')
@classmethod @classmethod
#@property #@property

Loading…
Cancel
Save