Skip to content

Commit

Permalink
fix: add back new_sidebar_items to patch
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Nov 7, 2023
1 parent 8e056be commit bc6ebbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions wiki/public/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const saveWikiPage = (draft = false) => {
message: `${isEmptyEditor ? "Created" : "Edited"} ${title}`,
content,
new: isEmptyEditor,
new_sidebar_items: isEmptyEditor ? getSidebarItems() : "",
title,
draft,
new_sidebar_group: isEmptyEditor ? urlParams.get("newWiki") : "",
Expand Down
3 changes: 3 additions & 0 deletions wiki/wiki/doctype/wiki_page/wiki_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def update(
wiki_page_patch=None,
new=False,
new_sidebar_group="",
new_sidebar_items="",
draft=False,
):
context = {"route": name}
Expand All @@ -465,6 +466,7 @@ def update(
patch.message = message
patch.new = new
patch.new_sidebar_group = new_sidebar_group
patch.new_sidebar_items = new_sidebar_items
patch.save()

else:
Expand All @@ -479,6 +481,7 @@ def update(
"new": new,
"new_title": title,
"new_sidebar_group": new_sidebar_group,
"new_sidebar_items": new_sidebar_items,
}

patch.update(patch_dict)
Expand Down

0 comments on commit bc6ebbb

Please sign in to comment.