summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2019-09-23 15:07:06 +0200
committerMathieu Parent <math.parent@gmail.com>2019-09-24 20:02:45 +0200
commit1fb6f73f4d501c2b6c86c863d40481e1d7a707fe (patch)
tree13b62d5896f67b64887d781fb7af7e1bcee4f932
parentc287bdd0889881d89f991d3929ae513d91b5894c (diff)
downloadgitlab-1fb6f73f4d501c2b6c86c863d40481e1d7a707fe.tar.gz
fix(labels): don't mangle label name on update
-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.