Gauntlet173 / docassemble-openlcbr

A docassemble package for case outcome prediction using the analogical reasoning features of openlcbr.
MIT License
12 stars 4 forks source link

Deleting Sub-Issues in DB Builder causes infinite recursion error #20

Open Gauntlet173 opened 5 years ago

Gauntlet173 commented 5 years ago

Error RuntimeError: maximum recursion depth exceeded while calling a Python object History Needed definition of delete_leaf_node at 0.00000s Tried to ask question at 0.00008s event: delete_leaf_node code: | node = action_argument('node') m = re.search(r'^(.*)[([0-9]+)]$',node) list = m.group(1) index = int(m.group(2)) del m object = value(list + '[' + str(index) + ']') target = value(list) parent = object.parent target.pop(index)

Recalculate this node.

if len(target) == 0: parent.type = "leaf" if parent.attr('join_type') <> "": parent.join_type = "" parent.factors.reset_gathered() parent.factors.there_is_another = True

Gauntlet173 commented 5 years ago

Note that until this has been corrected the published version has had the delete subnode button removed.