Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkelView fails with some RelationalBones #79

Open
sveneberth opened this issue Dec 6, 2022 · 0 comments
Open

SkelView fails with some RelationalBones #79

sveneberth opened this issue Dec 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@sveneberth
Copy link
Member

sveneberth commented Dec 6, 2022

The SkelView causes an error if in the skeleton is a

  • non-multiple, not-multilang RelationalBone without an UsingSkel
  • multiple, multilang RelationalBone without an UsingSkel
  • multiple, multilang RelationalBone with an UsingSkel

(but I didn't tested all combinations).

Traceback (most recent call last):
  File "/.../deploy/viur/core/request.py", line 269, in processRequest
    self.findAndCall(path)
  File "/.../deploy/viur/core/request.py", line 608, in findAndCall
    res = caller(*newArgs, **newKwargs)
  File "/.../deploy/viur/core/prototypes/list.py", line 181, in list
    return self.render.list(res)
  File "/.../deploy/viur/core/render/html/default.py", line 432, in list
    return template.render(skellist=skellist, action=action, params=params, **kwargs)
  File "/.../site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/.../site-packages/jinja2/environment.py", line 926, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "html/list.html", line 2, in top-level template code
    {% from "macros/skelview.html" import SkelView %}
  File "html/viur_base.html", line 119, in top-level template code
    {% block content %}
  File "html/list.html", line 12, in block 'content'
    {{ SkelView(skel) }}
  File "/.../site-packages/jinja2/runtime.py", line 777, in _invoke
    rv = self._func(*arguments)
  File "html/macros/skelview.html", line 298, in template
    {{ SkelViewBone(
  File "/.../site-packages/jinja2/runtime.py", line 777, in _invoke
    rv = self._func(*arguments)
  File "html/macros/skelview.html", line 234, in template
    {{ SkelViewRelBoneFormat(structure[step]["format"], item, prefix="dest.") }}
  File "/.../site-packages/jinja2/runtime.py", line 777, in _invoke
    rv = self._func(*arguments)
  File "html/macros/skelview.html", line 77, in template
    {% for key, val in value.items() %}
  File "/.../site-packages/jinja2/utils.py", line 83, in from_obj
    if hasattr(obj, "jinja_pass_arg"):
jinja2.exceptions.UndefinedError: 'str object' has no attribute 'items'
@sveneberth sveneberth added the bug Something isn't working label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant