Commit ecb882e0 authored by Philipp Hörist's avatar Philipp Hörist

Dataforms: Set vars if form is not build from node

parent d4c2e5c7
......@@ -544,8 +544,6 @@ class DataRecord(ExtendedNode):
extend_field(field)
self.vars[field.var] = field
else:
for field in self.getTags('field'):
self.delChild(field)
self.fields = fields
@property
......@@ -562,11 +560,13 @@ class DataRecord(ExtendedNode):
if not isinstance(field, DataField):
extend_field(field)
self.addChild(node=field)
self.vars[field.var] = field
@fields.deleter
def fields(self):
for element in self.getTags('field'):
self.delChild(element)
self.vars.clear()
def iter_fields(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment