fix: do not add ancestors if page is in the root
This commit is contained in:
parent
85cc3f5e86
commit
f3553e9dfd
@ -357,9 +357,10 @@ class MkdocsWithConfluence(BasePlugin):
|
|||||||
"type": "page",
|
"type": "page",
|
||||||
"title": page_name,
|
"title": page_name,
|
||||||
"space": {"key": space},
|
"space": {"key": space},
|
||||||
"ancestors": [{"id": parent_page_id}],
|
|
||||||
"body": {"storage": {"value": page_content_in_storage_format, "representation": "storage"}},
|
"body": {"storage": {"value": page_content_in_storage_format, "representation": "storage"}},
|
||||||
}
|
}
|
||||||
|
if parent_page_id:
|
||||||
|
data["ancestors"] = [{"id": parent_page_id}]
|
||||||
logger.debug(f"DATA: {data}")
|
logger.debug(f"DATA: {data}")
|
||||||
if not self.dryrun:
|
if not self.dryrun:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user