Skip to content

Commit 61500d2

Browse files
committed
Add unintentionally removed
1 parent f05a613 commit 61500d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

meilisearch/index.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,11 @@ def update_settings(self, body: MutableMapping[str, Any]) -> TaskInfo:
10241024
An error containing details about why Meilisearch can't process your request.
10251025
Meilisearch error codes are described here: https://www.meilisearch.com/docs/reference/errors/error_codes#meilisearch-errors
10261026
"""
1027+
if body.get("embedders"):
1028+
for _, v in body["embedders"].items():
1029+
if "documentTemplateMaxBytes" in v and v["documentTemplateMaxBytes"] is None:
1030+
del v["documentTemplateMaxBytes"]
1031+
10271032
task = self.http.patch(
10281033
f"{self.config.paths.index}/{self.uid}/{self.config.paths.setting}", body
10291034
)
@@ -1956,6 +1961,11 @@ def update_embedders(self, body: Union[MutableMapping[str, Any], None]) -> TaskI
19561961
An error containing details about why Meilisearch can't process your request.
19571962
Meilisearch error codes are described here: https://www.meilisearch.com/docs/reference/errors/error_codes#meilisearch-errors
19581963
"""
1964+
if body.get("embedders"):
1965+
for _, v in body["embedders"].items():
1966+
if "documentTemplateMaxBytes" in v and v["documentTemplateMaxBytes"] is None:
1967+
del v["documentTemplateMaxBytes"]
1968+
19591969
task = self.http.patch(self.__settings_url_for(self.config.paths.embedders), body)
19601970

19611971
return TaskInfo(**task)

0 commit comments

Comments
 (0)