Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,13 @@ def is_page_content_is_already_updated(self, page_id, body, title=None):
:param title: Title to compare
:return: True if the same
"""
confluence_content = self.get_page_by_id(page_id)
if title:
current_title = confluence_content.get('title', None)
if title != current_title:
log.info('Title of {page_id} is different'.format(page_id=page_id))
return False

if self.advanced_mode:
confluence_content = (((self.get_page_by_id(page_id, expand='body.storage').json() or {})
.get('body') or {})
Expand All @@ -741,12 +748,6 @@ def is_page_content_is_already_updated(self, page_id, body, title=None):
.get('body') or {})
.get('storage') or {})

if title:
current_title = confluence_content.get('title', None)
if title != current_title:
log.info('Title of {page_id} is different'.format(page_id=page_id))
return False

confluence_body_content = confluence_content.get('value')

if confluence_body_content:
Expand Down