Skip to content

Commit 1c5b0a1

Browse files
committed
Handle body as boolean for POST HTTP requests
Required for facet-search settings and possibly others.
1 parent a43baec commit 1c5b0a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

meilisearch/_httprequests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def send_request(
3333
Mapping[str, Any],
3434
Sequence[Mapping[str, Any]],
3535
List[str],
36+
bool,
3637
bytes,
3738
str,
3839
int,
@@ -64,7 +65,7 @@ def send_request(
6465
serialize_body = isinstance(body, dict) or body
6566
data = (
6667
json.dumps(body, cls=serializer)
67-
if serialize_body
68+
if isinstance(body, bool) or serialize_body
6869
else "" if body == "" else "null"
6970
)
7071

@@ -111,6 +112,7 @@ def put(
111112
Mapping[str, Any],
112113
Sequence[Mapping[str, Any]],
113114
List[str],
115+
bool,
114116
bytes,
115117
str,
116118
int,

0 commit comments

Comments
 (0)