changeset 1423:870b198e98ea

pages: fix `onFileChange` when the page is not wrapped
author Goffi <goffi@goffi.org>
date Sat, 01 May 2021 19:05:16 +0200
parents 027f5059e1e2
children 69ba6b2ba949
files libervia/server/pages.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/pages.py	Sat May 01 19:05:05 2021 +0200
+++ b/libervia/server/pages.py	Sat May 01 19:05:16 2021 +0200
@@ -504,7 +504,10 @@
                     new_page = True
                 else:
                     if idx<len(path_elts)-1:
-                        parent = page.original
+                        try:
+                            parent = page.original
+                        except AttributeError:
+                            parent = page
 
             try:
                 # we (re)create a page with the new/modified code