Skip to content

fix(labels): ensure label.save() works - #937

Merged
max-wittig merged 1 commit into
python-gitlab:masterfrom
sathieu:fix_labels_save
Nov 14, 2019
Merged

fix(labels): ensure label.save() works#937
max-wittig merged 1 commit into
python-gitlab:masterfrom
sathieu:fix_labels_save

Conversation

@sathieu

@sathieu sathieu commented Nov 14, 2019

Copy link
Copy Markdown
Contributor

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.

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.
@max-wittig

Copy link
Copy Markdown
Member

Thanks for your MR!

@max-wittig
max-wittig merged commit c937338 into python-gitlab:master Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants