mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Put only_additional_fields to None if the difference gives an empty result.
This commit is contained in:
parent
d29d4f88da
commit
ba9fadc8f1
@ -1127,7 +1127,7 @@ impl InnerIndexSettingsDiff {
|
|||||||
let new: HashSet<_> = new.iter().cloned().collect();
|
let new: HashSet<_> = new.iter().cloned().collect();
|
||||||
if old.difference(&new).next().is_none() {
|
if old.difference(&new).next().is_none() {
|
||||||
// if no field has been removed return only the additional ones
|
// if no field has been removed return only the additional ones
|
||||||
Some(&new - &old)
|
Some(&new - &old).filter(|x| !x.is_empty())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user