Skip to content

Commit a9cd149

Browse files
authored
[Confluence] Fix page title comparison (#460)
1 parent d483336 commit a9cd149

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

atlassian/confluence.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,13 @@ def is_page_content_is_already_updated(self, page_id, body, title=None):
732732
:param title: Title to compare
733733
:return: True if the same
734734
"""
735+
confluence_content = self.get_page_by_id(page_id)
736+
if title:
737+
current_title = confluence_content.get('title', None)
738+
if title != current_title:
739+
log.info('Title of {page_id} is different'.format(page_id=page_id))
740+
return False
741+
735742
if self.advanced_mode:
736743
confluence_content = (((self.get_page_by_id(page_id, expand='body.storage').json() or {})
737744
.get('body') or {})
@@ -741,12 +748,6 @@ def is_page_content_is_already_updated(self, page_id, body, title=None):
741748
.get('body') or {})
742749
.get('storage') or {})
743750

744-
if title:
745-
current_title = confluence_content.get('title', None)
746-
if title != current_title:
747-
log.info('Title of {page_id} is different'.format(page_id=page_id))
748-
return False
749-
750751
confluence_body_content = confluence_content.get('value')
751752

752753
if confluence_body_content:

0 commit comments

Comments
 (0)