summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2019-09-25 00:04:45 +0200
committerGitHub <noreply@github.com>2019-09-25 00:04:45 +0200
commitff10726d70a62d32ef39398a431def9656c93927 (patch)
tree13b62d5896f67b64887d781fb7af7e1bcee4f932 /gitlab/v4/objects.py
parentc287bdd0889881d89f991d3929ae513d91b5894c (diff)
parent1fb6f73f4d501c2b6c86c863d40481e1d7a707fe (diff)
downloadgitlab-ff10726d70a62d32ef39398a431def9656c93927.tar.gz
Merge pull request #885 from sathieu/patch-1
Don't mangle label name on update
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 95ad30a..c4679cd 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -868,7 +868,8 @@ class GroupLabelManager(ListMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
**kwargs: Extra options to send to the server (e.g. sudo)
"""
new_data = new_data or {}
- new_data["name"] = name
+ if name:
+ new_data["name"] = name
super().update(id=None, new_data=new_data, **kwargs)
# Delete without ID.
@@ -3001,7 +3002,8 @@ class ProjectLabelManager(
**kwargs: Extra options to send to the server (e.g. sudo)
"""
new_data = new_data or {}
- new_data["name"] = name
+ if name:
+ new_data["name"] = name
super().update(id=None, new_data=new_data, **kwargs)
# Delete without ID.