Repository navigation
Conversation
…r sends body-format=none
"none" is not a valid body-format for GET /api/v2/pages/{id}, so Confluence
answered 400. Leave body-format out instead, which returns the page without a
body. get_body=False still takes precedence over body_format.
Fixes atlassian-api#1718
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1719 +/- ##
=======================================
Coverage 65.48% 65.48%
=======================================
Files 107 107
Lines 19436 19436
Branches 2129 2129
=======================================
Hits 12728 12728
Misses 6001 6001
Partials 707 707 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1718
ConfluenceCloud.get_page_by_id(page_id, get_body=False)sentbody-format=none.noneisn't one of the valuesGET /api/v2/pages/{id}accepts (storage, atlas_doc_format, view, export_view, anonymous_export_view, styled_view, editor), so Confluence answered 400.This drops
body-formatwhenget_body=False, so the page comes back without a body.get_body=Falsestill wins whenbody_formatis also passed, as it did before.Tests
test_get_page_by_id_without_bodynow expects nobody-formatparam.test_get_page_by_id_without_body_ignores_body_formatforget_body=Falsetogether withbody_format="storage".tests/test_confluence_v2*.py,tests/confluence) pass, and flake8 is clean on the changed files.