From 246f0e713030fc8b10301aacceabcbeef3190bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 May 2024 23:26:46 +0200 Subject: [PATCH] Make the filter field really optional --- meilisearch/src/routes/indexes/documents.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index 98a526eb8..5571b02eb 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -578,7 +578,7 @@ pub async fn delete_documents_by_filter( #[derive(Debug, Deserr)] #[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)] pub struct DocumentEditionByFunction { - #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] + #[deserr(default, error = DeserrJsonError)] filter: Option, #[deserr(error = DeserrJsonError, missing_field_error = DeserrJsonError::missing_document_filter)] function: String,