Skip to content

Commit

Permalink
fix: do not remove attached media when renaming an API Doc Page
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanmaisse authored and mergify[bot] committed Oct 16, 2023
1 parent 0519e7f commit 9dd3ac1
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -318,8 +318,11 @@ private static Page merge(UpdatePageEntity updatePageEntity, Page withUpdatePage
: withUpdatePage.getAccessControls()
);

List<PageMedia> pageMediaList = convertMediaEntity(updatePageEntity.getAttachedMedia());
page.setAttachedMedia(pageMediaList != null ? pageMediaList : withUpdatePage.getAttachedMedia());
page.setAttachedMedia(
updatePageEntity.getAttachedMedia() != null
? convertMediaEntity(updatePageEntity.getAttachedMedia())
: withUpdatePage.getAttachedMedia()
);
page.setParentId(
updatePageEntity.getParentId() != null
? updatePageEntity.getParentId().isEmpty() ? null : updatePageEntity.getParentId()
Expand Down

0 comments on commit 9dd3ac1

Please sign in to comment.