Skip to content

Commit f1e772e

Browse files
committed
publisher: correct v2 page updates with unset metadata
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 <[email protected]> (cherry picked from commit 5a1dc81)
1 parent 804ed5b commit f1e772e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinxcontrib/confluencebuilder/publisher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,8 +1518,8 @@ def _update_page(self, page, page_name, data, parent_id=None):
15181518
pending_new_labels = []
15191519
pending_prop_requests = []
15201520
if self.api_mode == 'v2':
1521-
orig_metadata = page.get('metadata', None)
1522-
update_metadata = update_page.pop('metadata', None)
1521+
orig_metadata = page.get('metadata', {})
1522+
update_metadata = update_page.pop('metadata', {})
15231523

15241524
# configure parent page for this page update
15251525
#

0 commit comments

Comments
 (0)