Skip to content

Fix YAML output for single organisation - #358

Merged
lucc merged 1 commit into
lucc:mainfrom
lbdr:fix/simple-org-yaml
Sep 7, 2026
Merged

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

Conversation

@lbdr

@lbdr lbdr commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@lucc
lucc merged commit e50c3c1 into lucc:main Sep 7, 2026
8 checks passed
@lucc

lucc commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Thanks that looks reasonable.

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.

2 participants