diff options
author | Max Wittig <max.wittig@siemens.com> | 2021-04-23 09:17:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 09:17:17 +0200 |
commit | 5fac07ab883120375532bfaf1dcae0f1d8940fb6 (patch) | |
tree | 34f9c5e7d8ae059a4d0714dff78af2342be5471a /gitlab/client.py | |
parent | 711896f20ff81826c58f1f86dfb29ad860e1d52a (diff) | |
parent | 3ba27ffb6ae995c27608f84eef0abe636e2e63da (diff) | |
download | gitlab-5fac07ab883120375532bfaf1dcae0f1d8940fb6.tar.gz |
Merge pull request #1404 from DylannCordel/fix-upd-user-bool-data-and-avatar
fix: update user's bool data and avatar
Diffstat (limited to 'gitlab/client.py')
-rw-r--r-- | gitlab/client.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gitlab/client.py b/gitlab/client.py index 7927b3f..3f28eb9 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -505,6 +505,12 @@ class Gitlab(object): json = None if post_data is None: post_data = {} + else: + # booleans does not exists for data (neither for MultipartEncoder): + # cast to string int to avoid: 'bool' object has no attribute 'encode' + for k, v in post_data.items(): + if isinstance(v, bool): + post_data[k] = str(int(v)) post_data["file"] = files.get("file") post_data["avatar"] = files.get("avatar") data = MultipartEncoder(post_data) |