10000 fix(labels): ensure label.save() works · lundbird/python-gitlab@727f536 · GitHub
[go: up one dir, main page]

Skip to content

Commit 727f536

Browse files
committed
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.
1 parent 9608886 commit 727f536

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab/v4/objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ def update(self, name, new_data=None, **kwargs):
914914
new_data = new_data or {}
915915
if name:
916916
new_data["name"] = name
917-
super().update(id=None, new_data=new_data, **kwargs)
917+
return super().update(id=None, new_data=new_data, **kwargs)
918918

919919
# Delete without ID.
920920
@exc.on_http_error(exc.GitlabDeleteError)
@@ -3049,7 +3049,7 @@ def update(self, name, new_data=None, **kwargs):
30493049
new_data = new_data or {}
30503050
if name:
30513051
new_data["name"] = name
3052-
super().update(id=None, new_data=new_data, **kwargs)
3052+
return super().update(id=None, new_data=new_data, **kwargs)
30533053

30543054
# Delete without ID.
30553055
@exc.on_http_error(exc.GitlabDeleteError)

0 commit comments

Comments
 (0)
0