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

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

Closed
JackSweetzer opened this issue Sep 17, 2018 · 4 comments
Closed
Assignees
Labels

Comments

@JackSweetzer
Copy link

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!

@jeglin05
Copy link

I was coming here to ask the same question.

it seems like every method in the workClient class is performing the same

if team_context.proejctId:

if you can get passed that call you run into a second check that gives you the same error:
if team_context.teamId:
team = team_context.team_id

@tedchamb tedchamb added the bug label Sep 20, 2018
@tedchamb
Copy link
Member

tedchamb commented Sep 20, 2018

Thanks for reporting this issue. The fix is in #120

@tedchamb
Copy link
Member

@tedchamb tedchamb self-assigned this Sep 20, 2018
@JackSweetzer
Copy link
Author

Great - thanks!

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

No branches or pull requests

3 participants