Skip to content

Commit

Permalink
fix: check if patch has attribute of new_sidebar_items on submitting …
Browse files Browse the repository at this point in the history
…new patch
  • Loading branch information
BreadGenie committed Aug 17, 2023
1 parent 64b8453 commit 0a1bcac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def update_old_page(self):
self.wiki_page_doc.update_page(self.new_title, self.new_code, self.message, self.raised_by)

def update_sidebars(self):
if not self.new_sidebar_items:
if not hasattr(self, "new_sidebar_items") or not self.new_sidebar_items:
self.new_sidebar_items = "{}"

sidebars = json.loads(self.new_sidebar_items)
Expand Down

0 comments on commit 0a1bcac

Please sign in to comment.