Skip to content

Commit

Permalink
fixing Confluence.remove_page_attachment_keep_version() function to n…
Browse files Browse the repository at this point in the history
…ot delete the whole attachment (#367)
  • Loading branch information
simonrupf authored and gonchik committed Oct 28, 2019
1 parent bc1cb99 commit b9140ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def remove_page_attachment_keep_version(self, page_id, filename, keep_last_versi
attachment_versions = self.get_attachment_history(attachment.get("id"))
while len(attachment_versions) > keep_last_versions:
remove_version_attachment_number = attachment_versions[keep_last_versions].get('number')
self.delete_attachment(page_id=page_id, filename=filename, version=remove_version_attachment_number)
self.delete_attachment_by_id(attachment_id=attachment.get("id"), version=remove_version_attachment_number)
log.info(
"Removed oldest version for {}, now versions equal more than {}".format(attachment.get('title'),
len(attachment_versions)))
Expand Down

0 comments on commit b9140ce

Please sign in to comment.