| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 60c5fd8 commit 3ba27ff
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -505,6 +505,12 @@ def http_request( | |||
| 505 | 505 | json = None | |
| 506 | 506 | if post_data is None: | |
| 507 | 507 | 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 | + for k, v in post_data.items(): | ||
| 512 | + if isinstance(v, bool): | ||
| 513 | + post_data[k] = str(int(v)) | ||
| 508 | 514 | post_data["file"] = files.get("file") | |
| 509 | 515 | post_data["avatar"] = files.get("avatar") | |
| 510 | 516 | data = MultipartEncoder(post_data) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments