Skip to content

Commit

Permalink
Update ProjectSnippet attributes
Browse files Browse the repository at this point in the history
'visibility_level' has been added as an optional attribute to keep
compatibility with older releases of gitlab.

Fixes #129
  • Loading branch information
Gauvain Pocentek committed Jul 16, 2016
1 parent 967595f commit 3ad612d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitlab/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,8 @@ class ProjectSnippet(GitlabObject):
_constructorTypes = {'author': 'User'}
requiredUrlAttrs = ['project_id']
requiredCreateAttrs = ['title', 'file_name', 'code']
optionalCreateAttrs = ['lifetime']
optionalCreateAttrs = ['lifetime', 'visibility_level']
optionalUpdateAttrs = ['title', 'file_name', 'code', 'visibility_level']
shortPrintAttr = 'title'
managers = [('notes', ProjectSnippetNoteManager,
[('project_id', 'project_id'), ('snippet_id', 'id')])]
Expand Down

0 comments on commit 3ad612d

Please sign in to comment.