Skip to content

Commit

Permalink
publisher: correct v2 page updates with unset metadata
Browse files Browse the repository at this point in the history
Correcting v2 API implementation recently introduced that incorrectly
prepared metadata objects when Confluence does not report any metadata
information for a page (which in turn results in `AttributeError`
exceptions).

Signed-off-by: James Knight <james.d.knight@live.com>
  • Loading branch information
jdknight committed May 12, 2024
1 parent d4151d3 commit 5a1dc81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinxcontrib/confluencebuilder/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,8 @@ def _update_page(self, page, page_name, data, parent_id=None):
pending_new_labels = []
pending_prop_requests = []
if self.api_mode == 'v2':
orig_metadata = page.get('metadata', None)
update_metadata = update_page.pop('metadata', None)
orig_metadata = page.get('metadata', {})
update_metadata = update_page.pop('metadata', {})

# configure parent page for this page update
#
Expand Down

0 comments on commit 5a1dc81

Please sign in to comment.