Skip to content

Save the document extensions configuration - #809

Open
Sanjays2402 wants to merge 1 commit into
doorstop-dev:developfrom
Sanjays2402:fix/save-document-extensions
Open

Save the document extensions configuration#809
Sanjays2402 wants to merge 1 commit into
doorstop-dev:developfrom
Sanjays2402:fix/save-document-extensions

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

Closes #681

Document.load() reads the extensions key from the document config, but Document.save() only wrote settings and attributes — so a document with an extensions section (e.g. a custom item_validator) silently lost it the first time doorstop rewrote the config. save() now emits extensions when the document has any, mirroring how attributes is written only when non-empty.

Regression test in doorstop/core/tests/test_document.py fails without the change and passes with it.

Document.load() reads the extensions key from the document config but
Document.save() only wrote settings and attributes, so any document with
an extensions section (for example a custom item_validator) silently
lost it the first time doorstop rewrote the config.

save() now emits extensions when the document has any, mirroring how the
attributes section is written only when non-empty.

Closes doorstop-dev#681
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.

Document.save doesnt save extensions

1 participant