Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

generic view function broken #13

@theVAX

Description

@theVAX

if you call the view()-function on a generated viur module you'll get this Error:

Traceback (most recent call last): 
File "<exec>", line 25, in <module> 
File "<exec>", line 20, in main 
File "/lib/python3.11/site-packages/viur/scriptor/module.py", line 44, in view return await viur.view(module=self._name, key=key, group=group, **kwargs)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
File "/lib/python3.11/site-packages/viur/scriptor/viur.py", line 96, in view return ret["values"] 
~~~^^^^^^^^^^ KeyError: 'values'

I made a example script to demonstate it:

from viur.scriptor.module import user

async def main():
    userkey=""
    auser=False
    async for au in user.list({"limit":1},renderer="vi"):
        auser=au
        break
    if auser:
        print(auser)
        userview = await user.view({"key":auser["key"]})
        print (userview)
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: CriticalThis should be dealt with ASAP. It's blocking someone.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions