Error !

AttributeError: 'Undefined' object has no attribute 'path'

${param.parent.content} % endif % if 'parent' in param.keys and param.parent is not None and param.parent.type == '[DOCUMENT]': <a href="${'/directory%s/%s' % ((parent.path != '/' and parent.path or ''), parent.name)}">Показать содержимое</a> % endif </div> % endif <br /> <div style="padding-left: 10px; font-size: 99%">
/var/web/www/templates/mako/directory/show-directory.html, line 320:
<a href="${'/directory%s/%s' % ((parent.path != '/' and parent.path or ''), parent.name)}">Показать содержимое</a>
/usr/local/lib/python3.9/dist-packages/mako/runtime.py, line 947:
callable_(context, *args, **kwargs)
/usr/local/lib/python3.9/dist-packages/mako/runtime.py, line 920:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
/usr/local/lib/python3.9/dist-packages/mako/runtime.py, line 878:
_render_context(
/usr/local/lib/python3.9/dist-packages/mako/template.py, line 478:
return runtime._render(
/var/web/www/directory.cgi, line 87:
return data.tpls.get_template ('mako/directory/show-directory.html').render_unicode (param = data.locals)
/var/web/www/directory.cgi, line 356:
html = handler(DATA, ah, fd)