mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 06:44:27 +01:00
reformat
This commit is contained in:
parent
a4be4c49e8
commit
ea3b269b77
@ -1003,11 +1003,13 @@ impl IndexScheduler {
|
|||||||
match index.primary_key(index_wtxn)? {
|
match index.primary_key(index_wtxn)? {
|
||||||
// if a primary key was set AND had already been defined in the index
|
// if a primary key was set AND had already been defined in the index
|
||||||
// but to a different value, we can make the whole batch fail.
|
// but to a different value, we can make the whole batch fail.
|
||||||
Some(pk) => if primary_key != pk {
|
Some(pk) => {
|
||||||
return Err(milli::Error::from(
|
if primary_key != pk {
|
||||||
milli::UserError::PrimaryKeyCannotBeChanged(pk.to_string()),
|
return Err(milli::Error::from(
|
||||||
)
|
milli::UserError::PrimaryKeyCannotBeChanged(pk.to_string()),
|
||||||
.into());
|
)
|
||||||
|
.into());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// if the primary key was set and there was no primary key set for this index
|
// if the primary key was set and there was no primary key set for this index
|
||||||
// we set it to the received value before starting the indexing process.
|
// we set it to the received value before starting the indexing process.
|
||||||
|
Loading…
Reference in New Issue
Block a user