summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2015-09-19 10:47:45 +0200
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2015-09-19 10:47:45 +0200
commite5aa69baf90675777bcd10927cfb92e561343b75 (patch)
tree2c2eb181769caad551d3a65b2ee47db55d6a89f8 /gitlab
parentd8fdbc4157623af8c2fabb4878e2de10a3efa933 (diff)
downloadgitlab-e5aa69baf90675777bcd10927cfb92e561343b75.tar.gz
Fix deletion of object not using 'id' as ID
Closes #68
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 93770f9..7872ecf 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -414,7 +414,8 @@ class Gitlab(object):
raise GitlabDeleteError('Missing attribute(s): %s' %
", ".join(missing))
- url = self._construct_url(id_=obj.id, obj=obj, parameters=params)
+ obj_id = getattr(obj, obj.idAttr)
+ url = self._construct_url(id_=obj_id, obj=obj, parameters=params)
headers = self._create_headers()
# Remove attributes that are used in url so that there is only