Handle missing attribute exception
This commit is contained in:
parent
a81e211789
commit
3ae39cefce
|
|
@ -15,7 +15,10 @@ from rooms.models import ModuleRoomSlug
|
|||
@hooks.register('after_edit_page')
|
||||
@hooks.register('after_create_page')
|
||||
def do_after_page_edit(request, page):
|
||||
blocks = get_room_blocks(page)
|
||||
try:
|
||||
blocks = get_room_blocks(page)
|
||||
except AttributeError:
|
||||
return
|
||||
for block in blocks:
|
||||
if isinstance(block, tuple):
|
||||
title = block[1]['title']
|
||||
|
|
|
|||
Loading…
Reference in New Issue