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

Task lists produce annotations with None #237

Open
matnel opened this issue Jun 10, 2024 · 0 comments
Open

Task lists produce annotations with None #237

matnel opened this issue Jun 10, 2024 · 0 comments

Comments

@matnel
Copy link

matnel commented Jun 10, 2024

tasks = client.tasks.list(project="1")

for task in tasks:
    print( task.data['username'] )
    print( task.annotations )

when running this code, task.annotations is printed as None, but with the following workaround I am able to get the annotations:

tasks = client.tasks.list(project="1")

for task in tasks:
    print( task.data['username'] )
    annotations = client._client_wrapper.httpx_client.request(f"api/tasks/{task.id}/annotations/", method="GET").json()
    print( annotations )

Looking at the code, most likely I should have defined fields = "all" on the client.tasks.list for them not to be None, but this is not the specified in short the documentation. If I could choose, I would instead change the default of client.tasks.list as fields ="all" to simplify the API use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant