Skip to content

Fix YAML output for single organisation - #358

Open
lbdr wants to merge 1 commit into
lucc:mainfrom
lbdr:fix/simple-org-yaml
Open

Fix YAML output for single organisation#358
lbdr wants to merge 1 commit into
lucc:mainfrom
lbdr:fix/simple-org-yaml

Conversation

@lbdr

@lbdr lbdr commented Sep 3, 2026

Copy link
Copy Markdown

A contact with a single organisation is currently rendered as a nested list when editing:

Organisation:
    - - Foo

instead of:

Organisation: Foo

The internal representation of a single organisation is [["Foo"]].
The previous YAML serializer handled this case by flattening the nested single-item list, but this behaviour was lost when YAML serialization was migrated to ruamel.yaml.

This adds the missing case to yaml_clean() and a regression test for the YAML output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant