Skip to content

AttributeError: 'TeamContext' object has no attribute 'projectId' #117

Closed
@JackSweetzer

Description

@JackSweetzer

Consider the following cut-down code:

from vsts.work.v4_1.models.team_context import TeamContext
work_client = connection.get_client('vsts.work.v4_1.work_client.WorkClient')

_project_id = <GUID>
_team_id = <GUID>

team = TeamContext(project_id=_project_id, team_id=_team_id)
work_client.get_backlogs(team_context=team)

WorkClient methods (and others) that take a TeamContext class do the following:

if team_context is not None:
    if team_context.projectId:
        project = team_context.project_id

..which results in the AttributeError in title; it should be checking team_context.project_id instead.

Or am I missing something? Cheers!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions