comparison libervia/server/pages.py @ 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 314bba1ae433
children 1a5410981c45
comparison
equal deleted inserted replaced
1422:027f5059e1e2 1423:870b198e98ea
502 .format(path=path)) 502 .format(path=path))
503 return 503 return
504 new_page = True 504 new_page = True
505 else: 505 else:
506 if idx<len(path_elts)-1: 506 if idx<len(path_elts)-1:
507 parent = page.original 507 try:
508 parent = page.original
509 except AttributeError:
510 parent = page
508 511
509 try: 512 try:
510 # we (re)create a page with the new/modified code 513 # we (re)create a page with the new/modified code
511 __, resource = cls.createPage(host, path, site_root, path_elts, 514 __, resource = cls.createPage(host, path, site_root, path_elts,
512 replace_on_conflict=True) 515 replace_on_conflict=True)