You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unify Section.__init__ and Sectionable.create_section behavior #368
The base.Sectionable class features a create_section method that allows the creation of a new Section from a Document or a Section and sets the new Section as the child of the calling parent.
The methods' arguments currently only include name, type and oid and features a different behaviour than the Sections own __init__ method:
name cannot be empty ; this should be changed to empty being default and allowed
type is by default set to undefined; this should also be changed to empty being default and allowed
all other attributes one can assign via Section.__init__ should also be assignable via the create_section method with the exception of parent.
When these changes are implemented, the section_type_undefined odml validation should be refactored: the check for string undefined should be removed and the warning message rephrased, since the above described behaviour is the only occurrence of setting the Section.type to undefined.
Activity
mpsonntag commentedon Apr 5, 2020
Section.__init__and theSectionable.create_sectionmethod will both by default settype="n.s.".[base] All attributes with create_section
[base] All attributes with create_section
[base] All attributes with create_section