Skip to content

docs: snippets example raises AttributeError #954

Closed

Description

@matusf

In file: snippets
Under section: "Update the snippet attributes:"
There is an example:

snippet.visibility_level = gitlab.Project.VISIBILITY_PUBLIC
snippet.save()

However, gitlab does not have attribute Project:

>>> import gitlab
>>> gitlab.__version__
'1.13.0'
>>> gitlab.Project.VISIBILITY_PUBLIC
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    gitlab.Project.VISIBILITY_PUBLIC
AttributeError: module 'gitlab' has no attribute 'Project'
>>>
>>> # this works:
>>> gitlab.VISIBILITY_PUBLIC
20

Activity

  1. added a commit that references this issue on Nov 29, 2019
    bbaa754
  2. max-wittig commented on Nov 29, 2019

    @max-wittig
    Member

    Thanks for the report!

  3. matusf commented on Nov 29, 2019

    @matusf
    ContributorAuthor

    Wow, you're fast 🚀 😃 thanks 👍

  4. locked as resolved and limited conversation to collaborators on Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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