8000 personal_access_tokens.rotate(<ID>) 'dict' object has no attribute 'token' · Issue #2836 · python-gitlab/python-gitlab · GitHub
[go: up one dir, main page]

Skip to content
personal_access_tokens.rotate(<ID>) 'dict' object has no attribute 'token' #2836
Closed
@FearTheBadger

Description

@FearTheBadger

Description of the problem, including code/CLI snippet

When using this labrary to rotate a personal access token, there is no token attribute to the resulting dict object.

Expected Behavior

That the new token is present in the object.

Actual Behavior

Taken from:
https://python-gitlab.readthedocs.io/en/stable/gl_objects/personal_access_tokens.html

new_token = gl.personal_access_tokens.rotate(1630)
print(new_token.token)
Traceback (most recent call last):
  File "blahblah/./rotate_token", line 12, in <module>
    print(new_token.token)
AttributeError: 'dict' object has no attribute 'token'

Specifications

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0