Skip to content

Commit 66772ed

Browse files
committed
Adding 'wiki' representation for 'convert_contentbody_to_new_type'. Tested on Confluence 5.10.1
1 parent b7f0ca2 commit 66772ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PythonConfluenceAPI/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ def convert_contentbody_to_new_type(self, content_data, old_representation, new_
11221122
--------------------------------------------------------------
11231123
"storage" | "view","export_view","editor"
11241124
"editor" | "storage"
1125+
"wiki" | "storage"
11251126
"view" | None
11261127
"export_view" | None
11271128
@@ -1133,7 +1134,7 @@ def convert_contentbody_to_new_type(self, content_data, old_representation, new_
11331134
:return: The JSON data returned from the contentbody/convert/{to} endpoint,
11341135
or the results of the callback. Will raise requests.HTTPError on bad input, potentially.
11351136
"""
1136-
assert {old_representation, new_representation} < {"storage", "editor", "view", "export_view"}
1137+
assert {old_representation, new_representation} < {"storage", "editor", "view", "export_view", "wiki"}
11371138
# TODO: Enforce conversion rules better here.
11381139
request_data = {"value": str(content_data), "representation": old_representation}
11391140
return self._service_post_request("rest/api/contentbody/convert/{to}".format(to=new_representation),

0 commit comments

Comments
 (0)