atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

Failure updating page with update_page in Confluence

Open oaustegard opened this issue 4 years ago • 0 comments

Oddly I am sometimes able to use update_page to update an existing page in Confluence, but 9 times out of 10 I get the non-descript and unhelpful atlassian.errors.ApiValueError: No space or no content type, or setup a wrong version type set to content, or status param is not draft and status content is current

Looking at these lines a couple issues stand out: https://github.com/atlassian-api/atlassian-python-api/blob/c9b4bb0156983fdff1b9b87bc5376784cb400766/atlassian/confluence.py#L42-L46

  1. The if statement and error message do not match (in fact the few times the API has worked for me I used the 'editor' representation
  2. The Atlassian API documentation suggests the returned object's key should be storage, not representation: https://docs.atlassian.com/ConfluenceServer/rest/7.12.0/#api/content-update

oaustegard avatar May 14 '21 21:05 oaustegard