Skip to content

Commit 3ad612d

Browse files
author
Gauvain Pocentek
committed
Update ProjectSnippet attributes
'visibility_level' has been added as an optional attribute to keep compatibility with older releases of gitlab. Fixes #129
1 parent 967595f commit 3ad612d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitlab/objects.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,8 @@ class ProjectSnippet(GitlabObject):
14941494
_constructorTypes = {'author': 'User'}
14951495
requiredUrlAttrs = ['project_id']
14961496
requiredCreateAttrs = ['title', 'file_name', 'code']
1497-
optionalCreateAttrs = ['lifetime']
1497+
optionalCreateAttrs = ['lifetime', 'visibility_level']
1498+
optionalUpdateAttrs = ['title', 'file_name', 'code', 'visibility_level']
14981499
shortPrintAttr = 'title'
14991500
managers = [('notes', ProjectSnippetNoteManager,
15001501
[('project_id', 'project_id'), ('snippet_id', 'id')])]

0 commit comments

Comments
 (0)