Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5fac07a

Browse files
authored
Merge pull request#1404 from DylannCordel/fix-upd-user-bool-data-and-avatar
fix: update user's bool data and avatar
2 parents711896f +3ba27ff commit5fac07a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎gitlab/client.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,12 @@ def http_request(
505505
json=None
506506
ifpost_dataisNone:
507507
post_data= {}
508+
else:
509+
# booleans does not exists for data (neither for MultipartEncoder):
510+
# cast to string int to avoid: 'bool' object has no attribute 'encode'
511+
fork,vinpost_data.items():
512+
ifisinstance(v,bool):
513+
post_data[k]=str(int(v))
508514
post_data["file"]=files.get("file")
509515
post_data["avatar"]=files.get("avatar")
510516
data=MultipartEncoder(post_data)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp