Skip to content

Project issue.author.id throwing error - 'dict' object has no attribute 'id' #564

@CordThomas

Description

@CordThomas

Description of the problem, including code/CLI snippet

I have code that is used to identify the author of an issue:

issue_author_id = issue.author.id

The author should be a json object that i feel should be an Author object but is being returned as a dictionary, not sure why. So, now i have to convert a number of these calls to issue.author['id']

Expected Behavior

Return the ID of the author object

Actual Behavior

Throws an error:

AttributeError: 'dict' object has no attribute 'id'

Specifications

  • python-gitlab version: 1.5.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 10.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions