SuffolkLITLab / docassemble-MAVirtualCourt

Project which currently holds code for the Doc Assembly Line project, including dependencies for actual interviews.
Other
7 stars 5 forks source link

209A: Docassemble Defining Children #27

Closed brooksmk closed 4 years ago

brooksmk commented 4 years ago

Despite the code: | block that controls the flow of the interview only referencing children[0], docassemble still looks for the definition of other children. My one thought for fixing this would be that there's code the marks unfilled fields in the FINAL attachment block as DAEMpty(), but do we do the same for the preview block? That seems silly because I fell like we would have run into this before...

nonprofittechy commented 4 years ago

If the list has only one child, set children.there_is_another = False somewhere. mark_unfilled_fields_empty() does not close up any lists, but we could talk about whether that behavior would be useful. I actually do kind of like that idea, but it could cause unexpected behavior.

May be better to explicitly say when the list can only have one item.

nonprofittechy commented 4 years ago

I haven't run into this on the stitched up version, but I'm changing to children.gather(). Note that we changed the attachment block to reference children_of_both, which is a subset of children. I think behavior is correct to look for all of the children to be defined.