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

Listing standups requires 'personalized' bool in JSON response, but it's not present #3

@CodingDavid8

Description

@CodingDavid8

Hi there! 👋
Thanks for your work so far, looks like a really helpful package, just stumbled on it :)

I wrote a simple test iny my package that looks something like this:

def test_standup_connection():
    standups = []
    for standup in geekbot.instance.client.standups.list():
        standups.append(standup)

    print(standups)

However, I always get a ValidationError when calling the list() method:

test_geekbot.py::test_standup_connection FAILED                          [100%]
test_geekbot.py:7 (test_standup_connection)
def test_standup_connection():
        standups = []
>       for standup in geekbot.instance.client.standups.list():

test_geekbot.py:10: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Python39\lib\site-packages\geekbot_api\clients\standups.py:22: in list
    yield Standup(**standup)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pydantic.error_wrappers.ValidationError: 1 validation error for Standup
E   personalized
E     field required (type=value_error.missing)

pydantic\main.py:406: ValidationError

I already debugged the code and found the root of the problem. By setting a breakpoint at the yield, I saw that my json was lacking of the personalized boolean that is required in the StandupBase class.

json

I'm not familiar with pydantic, but I think it should be quite easy to fix this.

What is the personalized value used for anyway? Do you have any idea when it is present or not?
It might be because I didn't create the standup myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions