summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-23 19:11:28 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-23 19:11:28 +0100
commit1ecb7399ad2fb469781068208f787818aa52eec2 (patch)
tree52d8b5f47a94191849fbf63ae652968638053583 /gitlab/objects.py
parent9709d79f98eccee2a9f821f9fcc9dfbd5b55b70b (diff)
downloadgitlab-1ecb7399ad2fb469781068208f787818aa52eec2.tar.gz
fix ProjectLabel get and delete
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 6e15c3a..5ae1fb3 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -177,11 +177,12 @@ class GitlabObject(object):
# Some objects (e.g. merge requests) have different urls for singular and
# plural
_urlPlural = None
+ _id_in_delete_url = True
_returnClass = None
_constructorTypes = None
+
#: Whether _get_list_or_object should return list or object when id is None
getListWhenNoId = True
-
#: Tells if GitLab-api allows retrieving single objects.
canGet = True
#: Tells if GitLab-api allows listing of objects.
@@ -897,6 +898,8 @@ class ProjectMilestoneManager(BaseManager):
class ProjectLabel(GitlabObject):
_url = '/projects/%(project_id)s/labels'
+ _id_in_delete_url = False
+ canGet = 'from_list'
requiredUrlAttrs = ['project_id']
idAttr = 'name'
requiredDeleteAttrs = ['name']