summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-07-16 18:59:00 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-07-16 19:00:59 +0200
commit3ad612de8753e20f7359c16e5bce4c06772c9550 (patch)
treef85b5e01c0be819073c79fcca748505a1e4d96a1 /gitlab/objects.py
parent967595f504b8de076ae9218a96c3b8dd6273b9d6 (diff)
downloadgitlab-3ad612de8753e20f7359c16e5bce4c06772c9550.tar.gz
Update ProjectSnippet attributes
'visibility_level' has been added as an optional attribute to keep compatibility with older releases of gitlab. Fixes #129
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 8b81771..08ca3c1 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -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')])]