summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2019-11-14 10:37:18 +0100
committerMathieu Parent <math.parent@gmail.com>2019-11-14 10:38:01 +0100
commit727f53619dba47f0ab770e4e06f1cb774e14f819 (patch)
tree90c7bb22efa134c69980f35a3b163249145194b0 /gitlab/v4/objects.py
parent960888628617beae75392dcdcb6ef5a66abd976d (diff)
downloadgitlab-727f53619dba47f0ab770e4e06f1cb774e14f819.tar.gz
fix(labels): ensure label.save() works
Otherwise, we get: File "gitlabracadabra/mixins/labels.py", line 67, in _process_labels current_label.save() File "gitlab/exceptions.py", line 267, in wrapped_f return f(*args, **kwargs) File "gitlab/v4/objects.py", line 896, in save self._update_attrs(server_data) File "gitlab/base.py", line 131, in _update_attrs self.__dict__["_attrs"].update(new_attrs) TypeError: 'NoneType' object is not iterable Because server_data is None.
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 24f623d..3ac7a4a 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -914,7 +914,7 @@ class GroupLabelManager(ListMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
new_data = new_data or {}
if name:
new_data["name"] = name
- super().update(id=None, new_data=new_data, **kwargs)
+ return super().update(id=None, new_data=new_data, **kwargs)
# Delete without ID.
@exc.on_http_error(exc.GitlabDeleteError)
@@ -3049,7 +3049,7 @@ class ProjectLabelManager(
new_data = new_data or {}
if name:
new_data["name"] = name
- super().update(id=None, new_data=new_data, **kwargs)
+ return super().update(id=None, new_data=new_data, **kwargs)
# Delete without ID.
@exc.on_http_error(exc.GitlabDeleteError)