Skip to content

Commit e5aa69b

Browse files
author
Gauvain Pocentek
committed
Fix deletion of object not using 'id' as ID
Closes #68
1 parent d8fdbc4 commit e5aa69b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitlab/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@ def delete(self, obj, **kwargs):
414414
raise GitlabDeleteError('Missing attribute(s): %s' %
415415
", ".join(missing))
416416

417-
url = self._construct_url(id_=obj.id, obj=obj, parameters=params)
417+
obj_id = getattr(obj, obj.idAttr)
418+
url = self._construct_url(id_=obj_id, obj=obj, parameters=params)
418419
headers = self._create_headers()
419420

420421
# Remove attributes that are used in url so that there is only

0 commit comments

Comments
 (0)